@mark1russell7/machines 0.3.9 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/build/index.d.ts +33 -0
- package/build/index.js +782 -3
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,8 +46,10 @@ The algebra reads these documents. It gives the closed form of each timer, the f
|
|
|
46
46
|
| `PGBOUNCER_CLIENT` | `pgbouncer-client` | PgBouncer 1.26.1 in transaction pooling: one client connection | proxy | 29 implemented |
|
|
47
47
|
| `PGBOUNCER_SERVER` | `pgbouncer-server` | PgBouncer 1.26.1 in transaction pooling: one server connection of a pool | proxy | 26 implemented |
|
|
48
48
|
| `PGPOOL_SESSION` | `pgpool-session` | Pgpool-II 4.7.3 with one backend: one session of a client in its child process | proxy | 15 implemented |
|
|
49
|
+
| `SUPAVISOR_CLIENT` | `supavisor-client` | Supavisor 2.9.13 in transaction mode: one client connection | proxy | 15 implemented |
|
|
50
|
+
| `SUPAVISOR_SERVER` | `supavisor-server` | Supavisor 2.9.13 in transaction mode: one server connection of the pool of a tenant | proxy | 10 implemented, 1 observed |
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
Nineteen documents operate on Linux TCP (`over`). Linux TCP, conntrack, the Sentinel and the replication of mongod operate on no other document. The `conditions` of each document give the range where it holds, for example a range of kernels.
|
|
51
53
|
|
|
52
54
|
The package also gives these parts:
|
|
53
55
|
|
|
@@ -93,6 +95,18 @@ A change to the version of a system changes its sources too. Each fact of the do
|
|
|
93
95
|
|
|
94
96
|
In this repository, a snapshot of the predictions of the cells (`packages/cells/src/__snapshots__/predictions.json`) shows each prediction that a change to a document moves.
|
|
95
97
|
|
|
98
|
+
### 0.3.11
|
|
99
|
+
|
|
100
|
+
- **The connect timer of PgBouncer can fire early.** libevent 2.1 counts a timeout from its cached time of the pass, not from the clock (event.c, `event_add_nolock` with `gettime` and `tv_cache`). Thus server_connect_timeout can fire up to one pass early, and its band has an early slack of 10 ms. In run 39160356281 the timer closed the socket at 127.998993 s, 1.007 ms before 128 s.
|
|
101
|
+
|
|
102
|
+
### 0.3.10
|
|
103
|
+
|
|
104
|
+
- **Supavisor 2.9.13, in transaction mode.** Two new documents, each from the Elixir source at the tag v2.9.13:
|
|
105
|
+
- `supavisor-client`: one client connection. Between two transactions the client holds no server connection, thus a fault of the server reaches an idle client only through the pool. At the defaults Supavisor writes a heartbeat to an idle client each 60 s. A checkout waits up to 15 s for a server connection, then FATAL XX000. Each client socket has SO_KEEPALIVE.
|
|
106
|
+
- `supavisor-server`: one server connection of the pool. The connect has a timeout of 5 s, and a failed connect gives FATAL 08006 to a client that waits for it. The next connect of the pool waits the rest of 2.5 s. The server socket has no keepalive.
|
|
107
|
+
- A server that shuts down can end each idle client of the tenant. When a login of the pool gets 57P03, Supavisor shuts the pool down gracefully: each client outside a transaction gets FATAL 57P01 and its close. In run 39164922565 that came in 6 of 11 runs, and the other 5 met a refused connect, which keeps the pool.
|
|
108
|
+
- In 2.9.13, client_idle_timeout ends no session. Its timer fires an event that no clause of the client handler takes, thus the document gives it no timer.
|
|
109
|
+
|
|
96
110
|
### 0.3.9
|
|
97
111
|
|
|
98
112
|
- **The SYN give-up of Linux TCP has its lateness.** Each wait of the SYN is a timer of the wheel, which rounds it up at its level. At the defaults and HZ 1000, the wait of 64 s can be 4.096 s late. Thus the give-up is 131 s to 137.08 s. At HZ 250 it is up to 5.056 s late. The lateness needs `@mark1russell7/algebra` 0.7.2.
|
package/build/index.d.ts
CHANGED
|
@@ -269,6 +269,39 @@ export declare const PGPOOL_SESSION: Machine;
|
|
|
269
269
|
*/
|
|
270
270
|
export declare const POSTGRES_SESSION: Machine;
|
|
271
271
|
//#endregion
|
|
272
|
+
//#region src/pg/supavisor-client.d.ts
|
|
273
|
+
/**
|
|
274
|
+
* This document is Supavisor 2.9.13 in transaction mode, for one client connection. It gives the
|
|
275
|
+
* states of the client handler (a gen_statem) from the accept to the close, and the timers that act
|
|
276
|
+
* on it.
|
|
277
|
+
*
|
|
278
|
+
* Between two transactions the client holds no server connection. A message of the client checks one
|
|
279
|
+
* out of the pool of the tenant, and ReadyForQuery of the server checks it in. Thus a fault of the
|
|
280
|
+
* server reaches an idle client only through the pool. Its next query meets the pool, or the pool
|
|
281
|
+
* shuts down and closes it, as after 57P03 at a login of the pool.
|
|
282
|
+
*
|
|
283
|
+
* At the defaults the handler writes a heartbeat to an idle client each 60 s: a ParameterStatus of
|
|
284
|
+
* application_name. A failed write ends the client. client_idle_timeout does not end a session in
|
|
285
|
+
* 2.9.13: its timer fires an event that no clause handles. Each client socket has SO_KEEPALIVE.
|
|
286
|
+
*/
|
|
287
|
+
export declare const SUPAVISOR_CLIENT: Machine;
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region src/pg/supavisor-server.d.ts
|
|
290
|
+
/**
|
|
291
|
+
* This document is Supavisor 2.9.13 in transaction mode, for one server connection of the pool of a
|
|
292
|
+
* tenant. It is one DbHandler, a gen_statem, from its start by the pool to its end.
|
|
293
|
+
*
|
|
294
|
+
* The connect to the server has a timeout of 5 s, and the authentication 15 s. A failed connect ends the
|
|
295
|
+
* DbHandler with FATAL 08006 'Failed to connect to database'. A client that waits for this connection gets
|
|
296
|
+
* that error at once. The pool then starts a new DbHandler, which waits the rest of 2.5 s from the last
|
|
297
|
+
* failure before it connects.
|
|
298
|
+
*
|
|
299
|
+
* The DbHandler reads its socket in each state. Thus a close or a reset of the server ends it at once, idle
|
|
300
|
+
* or with a client. A client that holds the connection then gets the close. The server socket has
|
|
301
|
+
* TCP_NODELAY and no keepalive, and no timer of Supavisor bounds a query.
|
|
302
|
+
*/
|
|
303
|
+
export declare const SUPAVISOR_SERVER: Machine;
|
|
304
|
+
//#endregion
|
|
272
305
|
//#region src/procedures-ws.d.ts
|
|
273
306
|
/**
|
|
274
307
|
* This document is the connection of the WebSocket client of `@procedures/client` 0.3.0
|