@mark1russell7/machines 0.3.11 → 0.3.13

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 CHANGED
@@ -95,6 +95,16 @@ A change to the version of a system changes its sources too. Each fact of the do
95
95
 
96
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.
97
97
 
98
+ ### 0.3.13
99
+
100
+ - **A reload of a pooler.** `pgbouncer-client`, `pgbouncer-server` and `pgpool-session` have the event `local.reload`: SIGHUP, which reads the configuration again. No transition takes it, thus a session keeps its state, its server and each timer.
101
+ - PgBouncer: src/main.c:619-627, and src/loader.c:394-419 closes a server only when the connection of its database changed.
102
+ - Pgpool-II: src/main/pgpool_main.c:3551-3566 sends SIGHUP to each child, and a child in a session reads the configuration again in the loop of its query (src/protocol/pool_process_query.c:456-466).
103
+
104
+ ### 0.3.12
105
+
106
+ - **The send timeout of the client socket of Supavisor.** Supavisor 2.9.13 locks ranch 2.2.0. ranch gives each client socket a send timeout of 30 s that closes the socket (src/ranch_tcp.erl:108-109). Thus a write of a reply that waits 30 s ends the client. `supavisor-client` gives it as a source and a note, with no timer. A write waits only when the client takes no data, and on a broken path the FIN of the close waits behind the data. In run 39170773426, behind an MTU black hole, the socket closed 30.068 to 30.086 s after the fault in each of 11 runs.
107
+
98
108
  ### 0.3.11
99
109
 
100
110
  - **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.
package/build/index.d.ts CHANGED
@@ -283,6 +283,11 @@ export declare const POSTGRES_SESSION: Machine;
283
283
  * At the defaults the handler writes a heartbeat to an idle client each 60 s: a ParameterStatus of
284
284
  * application_name. A failed write ends the client. client_idle_timeout does not end a session in
285
285
  * 2.9.13: its timer fires an event that no clause handles. Each client socket has SO_KEEPALIVE.
286
+ *
287
+ * Each client socket also has the send timeout of ranch: a write to the client that waits 30 s fails,
288
+ * and the BEAM closes the socket. This document gives it no timer. A write waits when the client takes no
289
+ * data: a broken path, or a client that reads nothing. On a broken path, the FIN of the close waits
290
+ * behind the data that the kernel did not send.
286
291
  */
287
292
  export declare const SUPAVISOR_CLIENT: Machine;
288
293
  //#endregion
package/build/index.js CHANGED
@@ -7271,6 +7271,10 @@ const PGBOUNCER_CLIENT = machineSchema.parse({
7271
7271
  {
7272
7272
  ref: `${PB} src/admin.c:1017-1045 and src/objects.c:920-921 during PAUSE a new query gets no server, thus it waits. The janitor still runs query_wait_timeout (src/janitor.c:722-728)`,
7273
7273
  rung: "implemented"
7274
+ },
7275
+ {
7276
+ ref: `${PB} src/main.c:619-627 SIGHUP reads the configuration again (load_config). No client changes its state: a reload has no transition here, and each timer of a client goes on`,
7277
+ rung: "implemented"
7274
7278
  }
7275
7279
  ],
7276
7280
  states: {
@@ -7294,6 +7298,10 @@ const PGBOUNCER_CLIENT = machineSchema.parse({
7294
7298
  kind: "local",
7295
7299
  note: "PgBouncer accepts the TCP connection"
7296
7300
  },
7301
+ "local.reload": {
7302
+ kind: "local",
7303
+ note: "SIGHUP, or RELOAD on the console: PgBouncer reads its configuration again. No transition takes it"
7304
+ },
7297
7305
  "local.logged-in": {
7298
7306
  kind: "local",
7299
7307
  note: "The authentication of the client ends"
@@ -7875,6 +7883,10 @@ const PGBOUNCER_SERVER = machineSchema.parse({
7875
7883
  {
7876
7884
  ref: `${PB} src/objects.c:2311-2424 and src/loader.c:394-419 RECONNECT, or a RELOAD that changes the connection of a database, marks each server: an idle one closes at the next pass, a linked one at its release`,
7877
7885
  rung: "implemented"
7886
+ },
7887
+ {
7888
+ ref: `${PB} src/main.c:619-627 and src/loader.c:394-419 SIGHUP reads the configuration again. A database whose connection is the same keeps each server: a reload with the same configuration has no transition here`,
7889
+ rung: "implemented"
7878
7890
  }
7879
7891
  ],
7880
7892
  states: {
@@ -7900,6 +7912,10 @@ const PGBOUNCER_SERVER = machineSchema.parse({
7900
7912
  kind: "local",
7901
7913
  note: "The pool starts a connection to the server"
7902
7914
  },
7915
+ "local.reload": {
7916
+ kind: "local",
7917
+ note: "SIGHUP: PgBouncer reads its configuration again. With the same connection of the database, no transition takes it"
7918
+ },
7903
7919
  "socket.connect": {
7904
7920
  kind: "local",
7905
7921
  note: "The TCP connect ends"
@@ -8463,6 +8479,10 @@ const PGPOOL_SESSION = machineSchema.parse({
8463
8479
  {
8464
8480
  ref: `${PP} src/utils/error/elog.c:1888-2007 an error of the session goes to the client as an ErrorResponse: its severity, the SQLSTATE of Pgpool-II or XX000, and the message`,
8465
8481
  rung: "implemented"
8482
+ },
8483
+ {
8484
+ ref: `${PP} src/main/pgpool_main.c:3551-3566 and src/protocol/pool_process_query.c:456-466 SIGHUP: the parent reads the configuration again and sends SIGHUP to each child. A child in a session reads it again in the loop of its query and keeps the session: a reload has no transition here`,
8485
+ rung: "implemented"
8466
8486
  }
8467
8487
  ],
8468
8488
  states: {
@@ -8485,6 +8505,10 @@ const PGPOOL_SESSION = machineSchema.parse({
8485
8505
  kind: "local",
8486
8506
  note: "The child accepts the TCP connection"
8487
8507
  },
8508
+ "local.reload": {
8509
+ kind: "local",
8510
+ note: "SIGHUP, as pgpool reload sends it: the child reads its configuration again. No transition takes it"
8511
+ },
8488
8512
  "rx.startup": {
8489
8513
  kind: "rx",
8490
8514
  note: "The startup packet of the client"
@@ -9615,6 +9639,11 @@ const SV = "v2.9.13";
9615
9639
  * At the defaults the handler writes a heartbeat to an idle client each 60 s: a ParameterStatus of
9616
9640
  * application_name. A failed write ends the client. client_idle_timeout does not end a session in
9617
9641
  * 2.9.13: its timer fires an event that no clause handles. Each client socket has SO_KEEPALIVE.
9642
+ *
9643
+ * Each client socket also has the send timeout of ranch: a write to the client that waits 30 s fails,
9644
+ * and the BEAM closes the socket. This document gives it no timer. A write waits when the client takes no
9645
+ * data: a broken path, or a client that reads nothing. On a broken path, the FIN of the close waits
9646
+ * behind the data that the kernel did not send.
9618
9647
  */
9619
9648
  const SUPAVISOR_CLIENT = machineSchema.parse({
9620
9649
  format: "mark1russell7.machine/1",
@@ -9641,6 +9670,14 @@ const SUPAVISOR_CLIENT = machineSchema.parse({
9641
9670
  ref: `${SV} lib/supavisor/application.ex:71-83 each listener is ranch_tcp with keepalive true: each client socket has SO_KEEPALIVE`,
9642
9671
  rung: "implemented"
9643
9672
  },
9673
+ {
9674
+ ref: `ranch 2.2.0, the version of mix.lock at ${SV}: src/ranch_tcp.erl:108-109 a listener sets send_timeout 30000 and send_timeout_close true, and each accepted socket has the options of its listener. Thus a write to the client that waits 30 s fails, and the BEAM closes the socket. The server connection ignores the result of each write of a reply to the client (lib/supavisor/db_handler.ex:890-905)`,
9675
+ rung: "implemented"
9676
+ },
9677
+ {
9678
+ ref: `${SV} run 39170773426 of mark1russell7/systems, T03.defaults.59: behind an MTU black hole at a router, each of 11 runs had a reply of 2 MB in flight. The client socket of Supavisor left ESTABLISHED for FIN_WAIT1 30.068 to 30.086 s after the fault, and the client got nothing in 60 s`,
9679
+ rung: "observed"
9680
+ },
9644
9681
  {
9645
9682
  ref: `${SV} lib/supavisor/client_handler.ex:21-23, :123, :198 a state_timeout of 5_000 ms in :handshake, and 2_500 ms for a TLS handshake`,
9646
9683
  rung: "implemented"
@@ -10007,7 +10044,7 @@ const SUPAVISOR_CLIENT = machineSchema.parse({
10007
10044
  },
10008
10045
  sets: {},
10009
10046
  ends: "client.gone",
10010
- note: "The socket of the client. ranch sets SO_KEEPALIVE and no other keepalive option, thus the three keepalive sysctls of the namespace apply"
10047
+ note: "The socket of the client. ranch sets SO_KEEPALIVE and no other keepalive option, thus the three keepalive sysctls of the namespace apply. It also sets a send timeout of 30 s that closes the socket. That close has no timer here: the kernel sends the FIN only after the data before it, an assumption of this document"
10011
10048
  }
10012
10049
  });
10013
10050
  //#endregion