@mark1russell7/machines 0.3.28 → 0.3.30
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 +3 -2
- package/build/index.d.ts +19 -0
- package/build/index.js +557 -205
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { machineSchema } from "@mark1russell7/algebra";
|
|
1
|
+
import { machineSchema } from "@mark1russell7/algebra/schema";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/grpc/grpc-go-server.ts
|
|
4
|
-
const AT$
|
|
4
|
+
const AT$17 = "grpc-go v1.84.0";
|
|
5
5
|
const GO = "go1.27.2 src/net";
|
|
6
6
|
const ETCD = "etcd v3.6.15";
|
|
7
7
|
/** These are the facts of the transport of grpc-go, for each server on it. */
|
|
8
8
|
const TRANSPORT = [
|
|
9
9
|
{
|
|
10
|
-
ref: `${AT$
|
|
10
|
+
ref: `${AT$17} internal/transport/defaults.go:31-40 the server keepalive: Time 2 h, Timeout 20 s. MinTime of the policy 5 min. MaxConnectionIdle, Age and AgeGrace infinite`,
|
|
11
11
|
rung: "implemented"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
ref: `${AT$
|
|
14
|
+
ref: `${AT$17} internal/transport/http2_server.go:226-253 the defaults of the parameters, a jitter of 10 % on MaxConnectionAge, and TCP_USER_TIMEOUT = Timeout when Time is not infinite`,
|
|
15
15
|
rung: "implemented"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
ref: `${AT$
|
|
18
|
+
ref: `${AT$17} internal/syscall/syscall_linux.go:71-90 SetTCPUserTimeout acts only on a *net.TCPConn. On any other net.Conn it does nothing`,
|
|
19
19
|
rung: "implemented"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
ref: `${AT$
|
|
22
|
+
ref: `${AT$17} internal/transport/http2_server.go:1197-1286 keepalive(): a PING after Time with no read, and Close when no read comes for Timeout after it. MaxConnectionIdle and MaxConnectionAge drain with GOAWAY, and AgeGrace closes`,
|
|
23
23
|
rung: "implemented"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
ref: `${AT$
|
|
26
|
+
ref: `${AT$17} internal/transport/http2_server.go:881-933 handlePing: a PING less than MinTime after the last one is a strike, and with no stream open and PermitWithoutStream false, less than 2 h. The third strike sends GOAWAY ENHANCE_YOUR_CALM too_many_pings and closes the connection`,
|
|
27
27
|
rung: "implemented"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
ref: `${AT$
|
|
30
|
+
ref: `${AT$17} internal/transport/http2_server.go:279-281, :1064, :1132, :1176 each write of headers, a status or data by the server clears the strikes`,
|
|
31
31
|
rung: "implemented"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
ref: `${AT$
|
|
34
|
+
ref: `${AT$17} internal/transport/http2_server.go:1291-1310 Close closes the net.Conn: a FIN, or a reset when bytes are unread`,
|
|
35
35
|
rung: "implemented"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
ref: `${AT$
|
|
38
|
+
ref: `${AT$17} internal/transport/http2_server.go:536-537, :603-615 a call with the header grpc-timeout gets a timer of that timeout from the read of its headers. Its end closes the stream with RST_STREAM CANCEL, and the context of the handler ends`,
|
|
39
39
|
rung: "implemented"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
ref: `${AT$
|
|
42
|
+
ref: `${AT$17} server.go:192, :1000-1009 a deadline of 120 s for the handshake of each new connection (ConnectionTimeout)`,
|
|
43
43
|
rung: "implemented"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
ref: `${AT$
|
|
46
|
+
ref: `${AT$17} server.go:894-905 the comment of grpc-go: Go sets a TCP keepalive of 15 s on each accepted connection`,
|
|
47
47
|
rung: "documented"
|
|
48
48
|
},
|
|
49
49
|
{
|
|
@@ -702,7 +702,7 @@ const ETCD_SERVER = serverOf({
|
|
|
702
702
|
});
|
|
703
703
|
//#endregion
|
|
704
704
|
//#region src/grpc/grpc-js.ts
|
|
705
|
-
const AT$
|
|
705
|
+
const AT$16 = "@grpc/grpc-js 1.14.6 src";
|
|
706
706
|
/**
|
|
707
707
|
* This document is grpc-js 1.14.6 on Node, for one channel to one server with no TLS, its transport
|
|
708
708
|
* (one HTTP/2 session on one TCP connection) and one unary call on it. It gives the states of the
|
|
@@ -732,83 +732,83 @@ const GRPC_JS = machineSchema.parse({
|
|
|
732
732
|
},
|
|
733
733
|
sources: [
|
|
734
734
|
{
|
|
735
|
-
ref: `${AT$
|
|
735
|
+
ref: `${AT$16}/transport.ts:70 KEEPALIVE_TIMEOUT_MS is 20000`,
|
|
736
736
|
rung: "implemented"
|
|
737
737
|
},
|
|
738
738
|
{
|
|
739
|
-
ref: `${AT$
|
|
739
|
+
ref: `${AT$16}/transport.ts:183-198 grpc.keepalive_time_ms is -1 when the caller gives none, grpc.keepalive_timeout_ms is 20000, and grpc.keepalive_permit_without_calls is false`,
|
|
740
740
|
rung: "implemented"
|
|
741
741
|
},
|
|
742
742
|
{
|
|
743
|
-
ref: `${AT$
|
|
743
|
+
ref: `${AT$16}/transport.ts:447-453 a PING goes out only with a keepalive time above 0, and with a call in flight or permit_without_calls`,
|
|
744
744
|
rung: "implemented"
|
|
745
745
|
},
|
|
746
746
|
{
|
|
747
|
-
ref: `${AT$
|
|
747
|
+
ref: `${AT$16}/transport.ts:455-507 each PING starts a timer of keepalive_timeout_ms, and its end with no ACK ends the transport (handleDisconnect). A failed send of the PING ends it too`,
|
|
748
748
|
rung: "implemented"
|
|
749
749
|
},
|
|
750
750
|
{
|
|
751
|
-
ref: `${AT$
|
|
751
|
+
ref: `${AT$16}/transport.ts:515-534 and :553-561 the keepalive timer starts with the first call in flight, and after each ACK. It is not reset by data. When it ends with no call in flight, the PING goes out at the start of the next call`,
|
|
752
752
|
rung: "implemented"
|
|
753
753
|
},
|
|
754
754
|
{
|
|
755
|
-
ref: `${AT$
|
|
755
|
+
ref: `${AT$16}/transport.ts:200-242 a close or an error of the session, or a close of its socket, ends the transport. A GOAWAY makes it unusable (reportDisconnectToOwner)`,
|
|
756
756
|
rung: "implemented"
|
|
757
757
|
},
|
|
758
758
|
{
|
|
759
|
-
ref: `${AT$
|
|
759
|
+
ref: `${AT$16}/transport.ts:205-227 a GOAWAY ENHANCE_YOUR_CALM with the data too_many_pings tells the subchannel that the server refused the pings`,
|
|
760
760
|
rung: "implemented"
|
|
761
761
|
},
|
|
762
762
|
{
|
|
763
|
-
ref: `${AT$
|
|
763
|
+
ref: `${AT$16}/transport.ts:431-441 handleDisconnect: each call in flight gets onDisconnect, and the session is destroyed in the next turn of the event loop`,
|
|
764
764
|
rung: "implemented"
|
|
765
765
|
},
|
|
766
766
|
{
|
|
767
|
-
ref: `${AT$
|
|
767
|
+
ref: `${AT$16}/transport.ts:684-687 shutdown closes the session: a GOAWAY, then the end of the socket after the last stream`,
|
|
768
768
|
rung: "implemented"
|
|
769
769
|
},
|
|
770
770
|
{
|
|
771
|
-
ref: `${AT$
|
|
771
|
+
ref: `${AT$16}/transport.ts:792-810 the transport is ready at the first SETTINGS of the server (remoteSettings)`,
|
|
772
772
|
rung: "implemented"
|
|
773
773
|
},
|
|
774
774
|
{
|
|
775
|
-
ref: `${AT$
|
|
775
|
+
ref: `${AT$16}/transport.ts:818-840 the TCP connect is net.connect with no timeout`,
|
|
776
776
|
rung: "implemented"
|
|
777
777
|
},
|
|
778
778
|
{
|
|
779
|
-
ref: `${AT$
|
|
779
|
+
ref: `${AT$16}/transport.ts:862 setNoDelay on each connection: TCP_NODELAY, thus no Nagle. No setKeepAlive anywhere in the package`,
|
|
780
780
|
rung: "implemented"
|
|
781
781
|
},
|
|
782
782
|
{
|
|
783
|
-
ref: `${AT$
|
|
783
|
+
ref: `${AT$16}/subchannel-call.ts:360-371 onDisconnect ends the call with UNAVAILABLE 'Connection dropped' in the next turn of the event loop, unless the stream ends first`,
|
|
784
784
|
rung: "implemented"
|
|
785
785
|
},
|
|
786
786
|
{
|
|
787
|
-
ref: `${AT$
|
|
787
|
+
ref: `${AT$16}/subchannel-call.ts:230-329 the end of a stream with no status: REFUSED_STREAM is UNAVAILABLE, CANCEL after a dropped connection is UNAVAILABLE, and an internal error of ECONNRESET or ETIMEDOUT is UNAVAILABLE`,
|
|
788
788
|
rung: "implemented"
|
|
789
789
|
},
|
|
790
790
|
{
|
|
791
|
-
ref: `${AT$
|
|
791
|
+
ref: `${AT$16}/load-balancing-call.ts:257-261 a stream that the server refused has the progress REFUSED, and any other started stream PROCESSED`,
|
|
792
792
|
rung: "implemented"
|
|
793
793
|
},
|
|
794
794
|
{
|
|
795
|
-
ref: `${AT$
|
|
795
|
+
ref: `${AT$16}/retrying-call.ts:631-652 a transparent retry for NOT_STARTED, and one for REFUSED. A PROCESSED call is retried only by a retry policy of the service config, which the defaults do not have`,
|
|
796
796
|
rung: "implemented"
|
|
797
797
|
},
|
|
798
798
|
{
|
|
799
|
-
ref: `${AT$
|
|
799
|
+
ref: `${AT$16}/load-balancing-call.ts:338-345 a pick in TRANSIENT_FAILURE fails the call at once, unless it asks for waitForReady`,
|
|
800
800
|
rung: "implemented"
|
|
801
801
|
},
|
|
802
802
|
{
|
|
803
|
-
ref: `${AT$
|
|
803
|
+
ref: `${AT$16}/resolving-call.ts:118-180 the deadline of a call is a timer from the start of the call. Its end cancels the call with DEADLINE_EXCEEDED`,
|
|
804
804
|
rung: "implemented"
|
|
805
805
|
},
|
|
806
806
|
{
|
|
807
|
-
ref: `${AT$
|
|
807
|
+
ref: `${AT$16}/deadline.ts:39-52 the header grpc-timeout is the time left to the deadline when the call sends its headers, rounded up to whole milliseconds. A server can start a timer of it`,
|
|
808
808
|
rung: "implemented"
|
|
809
809
|
},
|
|
810
810
|
{
|
|
811
|
-
ref: `${AT$
|
|
811
|
+
ref: `${AT$16}/subchannel-call.ts:269-279 a RST_STREAM CANCEL of the server ends the call with CANCELLED 'Call cancelled'`,
|
|
812
812
|
rung: "implemented"
|
|
813
813
|
},
|
|
814
814
|
{
|
|
@@ -816,23 +816,23 @@ const GRPC_JS = machineSchema.parse({
|
|
|
816
816
|
rung: "observed"
|
|
817
817
|
},
|
|
818
818
|
{
|
|
819
|
-
ref: `${AT$
|
|
819
|
+
ref: `${AT$16}/subchannel.ts:275-291 the end of the transport takes the subchannel from READY to IDLE. After too_many_pings the keepalive time doubles`,
|
|
820
820
|
rung: "implemented"
|
|
821
821
|
},
|
|
822
822
|
{
|
|
823
|
-
ref: `${AT$
|
|
823
|
+
ref: `${AT$16}/subchannel.ts:298-304 a failed connect takes the subchannel to TRANSIENT_FAILURE`,
|
|
824
824
|
rung: "implemented"
|
|
825
825
|
},
|
|
826
826
|
{
|
|
827
|
-
ref: `${AT$
|
|
827
|
+
ref: `${AT$16}/backoff-timeout.ts:23-26 the reconnect waits 1000 ms first, each next wait 1.6 times longer, up to 120000 ms, with a jitter of 0.2`,
|
|
828
828
|
rung: "implemented"
|
|
829
829
|
},
|
|
830
830
|
{
|
|
831
|
-
ref: `${AT$
|
|
831
|
+
ref: `${AT$16}/backoff-timeout.ts:124, :169-181, :197-201 the first wait after a reset is the initial delay, with no jitter. Each next wait is the last wait, jitter included, times 1.6 and capped, then ± 20 %: the jitter compounds`,
|
|
832
832
|
rung: "implemented"
|
|
833
833
|
},
|
|
834
834
|
{
|
|
835
|
-
ref: `${AT$
|
|
835
|
+
ref: `${AT$16}/internal-channel.ts:74-77 and :324-325 a channel with no call for grpc.client_idle_timeout_ms goes IDLE: 30 min at the defaults, 1 s at least`,
|
|
836
836
|
rung: "implemented"
|
|
837
837
|
},
|
|
838
838
|
{
|
|
@@ -2586,7 +2586,7 @@ const UNDICI_CLIENT = machineSchema.parse({
|
|
|
2586
2586
|
});
|
|
2587
2587
|
//#endregion
|
|
2588
2588
|
//#region src/http/undici-retry.ts
|
|
2589
|
-
const AT$
|
|
2589
|
+
const AT$15 = "undici 8.12.2 lib/handler/retry-handler.js";
|
|
2590
2590
|
/**
|
|
2591
2591
|
* This document is one request through a `RetryAgent` of undici 8.12.2: the retries of a reply
|
|
2592
2592
|
* whose status is retryable, for example 429 or 503. Each fact comes from the published package at
|
|
@@ -2620,7 +2620,7 @@ const UNDICI_RETRY = machineSchema.parse({
|
|
|
2620
2620
|
},
|
|
2621
2621
|
sources: [
|
|
2622
2622
|
{
|
|
2623
|
-
ref: `${AT$
|
|
2623
|
+
ref: `${AT$15}:125-133 the defaults: retryAfter true, maxTimeout 30000, minTimeout 500, timeoutFactor 2, maxRetries 5, the methods GET HEAD OPTIONS PUT DELETE TRACE QUERY, the statusCodes 500 502 503 504 429`,
|
|
2624
2624
|
rung: "implemented"
|
|
2625
2625
|
},
|
|
2626
2626
|
{
|
|
@@ -2628,19 +2628,19 @@ const UNDICI_RETRY = machineSchema.parse({
|
|
|
2628
2628
|
rung: "implemented"
|
|
2629
2629
|
},
|
|
2630
2630
|
{
|
|
2631
|
-
ref: `${AT$
|
|
2631
|
+
ref: `${AT$15}:331-351 the policy: a method or a status out of its lists is not retried, and a counter above maxRetries gives up`,
|
|
2632
2632
|
rung: "implemented"
|
|
2633
2633
|
},
|
|
2634
2634
|
{
|
|
2635
|
-
ref: `${AT$
|
|
2635
|
+
ref: `${AT$15}:353-370 the delay: Retry-After in seconds times 1000, or an HTTP-date less the clock of the client (:13-16), capped by maxTimeout; 0 at once; else min(minTimeout * timeoutFactor^(counter - 1), maxTimeout); then setTimeout`,
|
|
2636
2636
|
rung: "implemented"
|
|
2637
2637
|
},
|
|
2638
2638
|
{
|
|
2639
|
-
ref: `${AT$
|
|
2639
|
+
ref: `${AT$15}:380 the counter: one more at each reply`,
|
|
2640
2640
|
rung: "implemented"
|
|
2641
2641
|
},
|
|
2642
2642
|
{
|
|
2643
|
-
ref: `${AT$
|
|
2643
|
+
ref: `${AT$15}:175-192 and :518-535 a retryable status with throwOnError drops the body of the reply, and the error goes to the policy`,
|
|
2644
2644
|
rung: "implemented"
|
|
2645
2645
|
},
|
|
2646
2646
|
{
|
|
@@ -2802,7 +2802,7 @@ const UNDICI_RETRY = machineSchema.parse({
|
|
|
2802
2802
|
});
|
|
2803
2803
|
//#endregion
|
|
2804
2804
|
//#region src/ioredis-sentinel.ts
|
|
2805
|
-
const AT$
|
|
2805
|
+
const AT$14 = "ioredis 6.0.0 built";
|
|
2806
2806
|
/**
|
|
2807
2807
|
* This document is the Sentinel path of ioredis 6.0.0. It tells how ioredis finds the primary of a
|
|
2808
2808
|
* group through the Sentinels, loses it, and connects to the new one. The standalone states of
|
|
@@ -2823,43 +2823,43 @@ const IOREDIS_SENTINEL = machineSchema.parse({
|
|
|
2823
2823
|
},
|
|
2824
2824
|
sources: [
|
|
2825
2825
|
{
|
|
2826
|
-
ref: `${AT$
|
|
2826
|
+
ref: `${AT$14}/connectors/SentinelConnector/index.js:46-121 connect (each Sentinel in turn, then sentinelRetryStrategy)`,
|
|
2827
2827
|
rung: "implemented"
|
|
2828
2828
|
},
|
|
2829
2829
|
{
|
|
2830
|
-
ref: `${AT$
|
|
2830
|
+
ref: `${AT$14}/connectors/SentinelConnector/index.js:145-151 resolveMaster (get-master-addr-by-name, then SENTINEL sentinels)`,
|
|
2831
2831
|
rung: "implemented"
|
|
2832
2832
|
},
|
|
2833
2833
|
{
|
|
2834
|
-
ref: `${AT$
|
|
2834
|
+
ref: `${AT$14}/connectors/SentinelConnector/index.js:175-212 connectToSentinel and resolve (one connection for each question, no retry)`,
|
|
2835
2835
|
rung: "implemented"
|
|
2836
2836
|
},
|
|
2837
2837
|
{
|
|
2838
|
-
ref: `${AT$
|
|
2838
|
+
ref: `${AT$14}/connectors/SentinelConnector/index.js:27-39 check (the role of the ready check)`,
|
|
2839
2839
|
rung: "implemented"
|
|
2840
2840
|
},
|
|
2841
2841
|
{
|
|
2842
|
-
ref: `${AT$
|
|
2842
|
+
ref: `${AT$14}/connectors/SentinelConnector/FailoverDetector.js:6-43 (+switch-master, only with failoverDetector)`,
|
|
2843
2843
|
rung: "implemented"
|
|
2844
2844
|
},
|
|
2845
2845
|
{
|
|
2846
|
-
ref: `${AT$
|
|
2846
|
+
ref: `${AT$14}/redis/RedisOptions.js:9-57 (the defaults)`,
|
|
2847
2847
|
rung: "implemented"
|
|
2848
2848
|
},
|
|
2849
2849
|
{
|
|
2850
|
-
ref: `${AT$
|
|
2850
|
+
ref: `${AT$14}/redis/event_handler.js:294-355 closeHandler (retryStrategy, then maxRetriesPerRequest flushes the queue)`,
|
|
2851
2851
|
rung: "implemented"
|
|
2852
2852
|
},
|
|
2853
2853
|
{
|
|
2854
|
-
ref: `${AT$
|
|
2854
|
+
ref: `${AT$14}/redis/event_handler.js:364-449 readyHandler (retryAttempts back to 0, the resend, the offline queue)`,
|
|
2855
2855
|
rung: "implemented"
|
|
2856
2856
|
},
|
|
2857
2857
|
{
|
|
2858
|
-
ref: `${AT$
|
|
2858
|
+
ref: `${AT$14}/Redis.js:123-240 _connect (connectTimeout, keepAlive) and :379-405 sendCommand (the offline queue)`,
|
|
2859
2859
|
rung: "implemented"
|
|
2860
2860
|
},
|
|
2861
2861
|
{
|
|
2862
|
-
ref: `${AT$
|
|
2862
|
+
ref: `${AT$14}/Redis.js:599-605 handleReconnection (reconnectOnError: null, thus a READONLY error goes to the caller)`,
|
|
2863
2863
|
rung: "implemented"
|
|
2864
2864
|
}
|
|
2865
2865
|
],
|
|
@@ -3208,7 +3208,7 @@ var ioredis_status_default = {
|
|
|
3208
3208
|
"reconnecting": {},
|
|
3209
3209
|
"end": {
|
|
3210
3210
|
"final": true,
|
|
3211
|
-
"note": "connect()
|
|
3211
|
+
"note": "a call of connect() from end starts a new attempt"
|
|
3212
3212
|
}
|
|
3213
3213
|
},
|
|
3214
3214
|
events: {
|
|
@@ -5053,7 +5053,7 @@ const IOREDIS_STATUS = machineSchema.parse(ioredis_status_default);
|
|
|
5053
5053
|
const MANIFESTATIONS = z.record(z.string(), z.array(z.string())).parse(manifestations_default);
|
|
5054
5054
|
//#endregion
|
|
5055
5055
|
//#region src/mongo/mongod-replication.ts
|
|
5056
|
-
const AT$
|
|
5056
|
+
const AT$13 = "mongodb r9.0.4 src/mongo/db/repl";
|
|
5057
5057
|
/**
|
|
5058
5058
|
* This document is the replication of mongod 9.0.4. It gives one member of a replica set, its view
|
|
5059
5059
|
* of the primary, and the election that it can hold. The states are the states of the member. The
|
|
@@ -5084,95 +5084,95 @@ const MONGOD_REPL = machineSchema.parse({
|
|
|
5084
5084
|
},
|
|
5085
5085
|
sources: [
|
|
5086
5086
|
{
|
|
5087
|
-
ref: `${AT$
|
|
5087
|
+
ref: `${AT$13}/repl_set_config.idl:74-109 the settings: heartbeatIntervalMillis 2000, heartbeatTimeoutSecs 10, electionTimeoutMillis 10000, catchUpTimeoutMillis -1, catchUpTakeoverDelayMillis 30000`,
|
|
5088
5088
|
rung: "implemented"
|
|
5089
5089
|
},
|
|
5090
5090
|
{
|
|
5091
|
-
ref: `${AT$
|
|
5091
|
+
ref: `${AT$13}/repl_server_parameters.idl:320-328 replElectionTimeoutOffsetLimitFraction 0.15`,
|
|
5092
5092
|
rung: "implemented"
|
|
5093
5093
|
},
|
|
5094
5094
|
{
|
|
5095
|
-
ref: `${AT$
|
|
5095
|
+
ref: `${AT$13}/topology_coordinator.cpp:1058-1101 the heartbeat window and the timeout of each request, :1124-1147 the next heartbeat, :1239-1248 a member DOWN`,
|
|
5096
5096
|
rung: "implemented"
|
|
5097
5097
|
},
|
|
5098
5098
|
{
|
|
5099
|
-
ref: `${AT$
|
|
5099
|
+
ref: `${AT$13}/topology_coordinator.h:62 kMaxHeartbeatRetries 2`,
|
|
5100
5100
|
rung: "implemented"
|
|
5101
5101
|
},
|
|
5102
5102
|
{
|
|
5103
|
-
ref: `${AT$
|
|
5103
|
+
ref: `${AT$13}/replication_coordinator_impl_heartbeat.cpp:97-111 the random offset, :346-352 a heartbeat from the primary postpones the election, :1215-1271 the election timeout and its offset`,
|
|
5104
5104
|
rung: "implemented"
|
|
5105
5105
|
},
|
|
5106
5106
|
{
|
|
5107
|
-
ref: `${AT$
|
|
5107
|
+
ref: `${AT$13}/data_replicator_external_state_impl.cpp:70-81 an oplog batch that names a primary postpones the election`,
|
|
5108
5108
|
rung: "implemented"
|
|
5109
5109
|
},
|
|
5110
5110
|
{
|
|
5111
|
-
ref: `${AT$
|
|
5111
|
+
ref: `${AT$13}/delayable_timeout_callback.cpp:149-172 the offset changes at most once in its own length`,
|
|
5112
5112
|
rung: "implemented"
|
|
5113
5113
|
},
|
|
5114
5114
|
{
|
|
5115
|
-
ref: `${AT$
|
|
5115
|
+
ref: `${AT$13}/topology_coordinator.cpp:1440-1457 and :1476-1489 the liveness check: a primary that cannot see a majority steps down`,
|
|
5116
5116
|
rung: "implemented"
|
|
5117
5117
|
},
|
|
5118
5118
|
{
|
|
5119
|
-
ref: `${AT$
|
|
5119
|
+
ref: `${AT$13}/replication_coordinator_impl_heartbeat.cpp:1158-1188 the liveness check runs at the stalest member's last update plus the election timeout`,
|
|
5120
5120
|
rung: "implemented"
|
|
5121
5121
|
},
|
|
5122
5122
|
{
|
|
5123
|
-
ref: `${AT$
|
|
5123
|
+
ref: `${AT$13}/replication_coordinator_impl_elect_v1.cpp:189-226 the dry run, :268-382 the term, the durable vote and the real vote, :408-468 the win`,
|
|
5124
5124
|
rung: "implemented"
|
|
5125
5125
|
},
|
|
5126
5126
|
{
|
|
5127
|
-
ref: `${AT$
|
|
5127
|
+
ref: `${AT$13}/vote_requester.cpp:96 a vote request times out at min(electionTimeoutMillis, 30 s), :160-177 a majority of yes votes ends the round`,
|
|
5128
5128
|
rung: "implemented"
|
|
5129
5129
|
},
|
|
5130
5130
|
{
|
|
5131
|
-
ref: `${AT$
|
|
5131
|
+
ref: `${AT$13}/topology_coordinator.cpp:3741-3790 a member votes for each candidate whose data is not staler than its own, and only an arbiter refuses one because it sees a primary`,
|
|
5132
5132
|
rung: "implemented"
|
|
5133
5133
|
},
|
|
5134
5134
|
{
|
|
5135
|
-
ref: `${AT$
|
|
5135
|
+
ref: `${AT$13}/replication_coordinator_impl_catchup.cpp:35-85 the catch-up and its timeout, :110-133 it ends when each other member answered a heartbeat since the win, or failed one, :349-379 the win restarts each heartbeat`,
|
|
5136
5136
|
rung: "implemented"
|
|
5137
5137
|
},
|
|
5138
5138
|
{
|
|
5139
|
-
ref: `${AT$
|
|
5139
|
+
ref: `${AT$13}/topology_coordinator.cpp:3841-3849 and :3910-3932 a restarted heartbeat, and the latest optime that the catch-up waits for`,
|
|
5140
5140
|
rung: "implemented"
|
|
5141
5141
|
},
|
|
5142
5142
|
{
|
|
5143
|
-
ref: `${AT$
|
|
5143
|
+
ref: `${AT$13}/replication_coordinator_impl.cpp:1490-1570 the end of the drain: a reconfig of the term, then writes, :2580-2588 the hello of a primary that cannot write yet`,
|
|
5144
5144
|
rung: "implemented"
|
|
5145
5145
|
},
|
|
5146
5146
|
{
|
|
5147
|
-
ref: `${AT$
|
|
5147
|
+
ref: `${AT$13}/replication_coordinator_impl_step_up_step_down.cpp:64-329 replSetStepDown: the wait for a caught-up secondary, the step-down and the hand-off`,
|
|
5148
5148
|
rung: "implemented"
|
|
5149
5149
|
},
|
|
5150
5150
|
{
|
|
5151
|
-
ref: `${AT$
|
|
5151
|
+
ref: `${AT$13}/repl_set_commands.cpp:545-561 stepDownSecs 60 and secondaryCatchUpPeriodSecs 10`,
|
|
5152
5152
|
rung: "implemented"
|
|
5153
5153
|
},
|
|
5154
5154
|
{
|
|
5155
|
-
ref: `${AT$
|
|
5155
|
+
ref: `${AT$13}/replication_coordinator_impl.idl:18-26 enableElectionHandoff true, and replication_coordinator_impl.cpp:2830-2873 the hand-off: replSetStepUp with skipDryRun`,
|
|
5156
5156
|
rung: "implemented"
|
|
5157
5157
|
},
|
|
5158
5158
|
{
|
|
5159
|
-
ref: `${AT$
|
|
5159
|
+
ref: `${AT$13}/replication_coordinator_impl.cpp:1516 the reconfig of the term, :4598 and :4750 a new config starts each heartbeat again`,
|
|
5160
5160
|
rung: "implemented"
|
|
5161
5161
|
},
|
|
5162
5162
|
{
|
|
5163
|
-
ref: `${AT$
|
|
5163
|
+
ref: `${AT$13}/replication_coordinator_impl_heartbeat.cpp:367-376 a heartbeat response that moves a member's optime forward moves the commit point and wakes the writes that wait`,
|
|
5164
5164
|
rung: "implemented"
|
|
5165
5165
|
},
|
|
5166
5166
|
{
|
|
5167
|
-
ref: `${AT$
|
|
5167
|
+
ref: `${AT$13}/oplog_fetcher.cpp:119-133 the awaitData timeout min(electionTimeoutMillis / 2, 30 s), :317-324 the socket timeout adds oplogNetworkTimeoutBufferSeconds, :640-647 the exhaust read`,
|
|
5168
5168
|
rung: "implemented"
|
|
5169
5169
|
},
|
|
5170
5170
|
{
|
|
5171
|
-
ref: `${AT$
|
|
5171
|
+
ref: `${AT$13}/oplog_fetcher.cpp:395-441 an error makes a new cursor while restarts remain, :596-611 the new cursor sets the retried find timeout, :1073-1113 one restart after 5 ms`,
|
|
5172
5172
|
rung: "implemented"
|
|
5173
5173
|
},
|
|
5174
5174
|
{
|
|
5175
|
-
ref: `${AT$
|
|
5175
|
+
ref: `${AT$13}/repl_server_parameters.idl:121-126 oplogRetriedFindMaxSeconds 2, :234-244 oplogFetcherSteadyStateMaxFetcherRestarts 1, :344-351 oplogNetworkTimeoutBufferSeconds 5`,
|
|
5176
5176
|
rung: "implemented"
|
|
5177
5177
|
},
|
|
5178
5178
|
{
|
|
@@ -5180,19 +5180,19 @@ const MONGOD_REPL = machineSchema.parse({
|
|
|
5180
5180
|
rung: "implemented"
|
|
5181
5181
|
},
|
|
5182
5182
|
{
|
|
5183
|
-
ref: `${AT$
|
|
5183
|
+
ref: `${AT$13}/bgsync.cpp:395-447 a member without a sync source waits for new heartbeat data or 1 s (:971-976), and topology_coordinator.cpp:1124-1136 it sends its heartbeats each 500 ms`,
|
|
5184
5184
|
rung: "implemented"
|
|
5185
5185
|
},
|
|
5186
5186
|
{
|
|
5187
|
-
ref: `${AT$
|
|
5187
|
+
ref: `${AT$13}/replication_coordinator_impl.cpp:4947-4972 a member that loses its sync source starts each heartbeat again at once`,
|
|
5188
5188
|
rung: "implemented"
|
|
5189
5189
|
},
|
|
5190
5190
|
{
|
|
5191
|
-
ref: `${AT$
|
|
5191
|
+
ref: `${AT$13}/sync_source_feedback.cpp:37-47 the keepalive of the reporter min(electionTimeoutMillis / 2, 30 s), :39-40 the network timeout 30 s, :99-117 and :134-236 a new reporter only after the old one ends`,
|
|
5192
5192
|
rung: "implemented"
|
|
5193
5193
|
},
|
|
5194
5194
|
{
|
|
5195
|
-
ref: `${AT$
|
|
5195
|
+
ref: `${AT$13}/reporter.cpp:113-117 a reporter ends when its command in flight ends, :119-169 a trigger, :195-228 each replSetUpdatePosition has the network timeout`,
|
|
5196
5196
|
rung: "implemented"
|
|
5197
5197
|
},
|
|
5198
5198
|
{
|
|
@@ -5811,7 +5811,7 @@ const MONGOD_REPL = machineSchema.parse({
|
|
|
5811
5811
|
});
|
|
5812
5812
|
//#endregion
|
|
5813
5813
|
//#region src/mongo/mongod-session.ts
|
|
5814
|
-
const AT$
|
|
5814
|
+
const AT$12 = "mongodb r9.0.4 src/mongo";
|
|
5815
5815
|
/**
|
|
5816
5816
|
* This document is the hold of mongod 9.0.4 on one client connection, over its socket. `mongod`
|
|
5817
5817
|
* turns keepalive on for each TCP session. It lowers two keepalive options of the socket to a
|
|
@@ -5838,27 +5838,27 @@ const MONGOD_SESSION = machineSchema.parse({
|
|
|
5838
5838
|
},
|
|
5839
5839
|
sources: [
|
|
5840
5840
|
{
|
|
5841
|
-
ref: `${AT$
|
|
5841
|
+
ref: `${AT$12}/transport/asio/asio_session_impl.cpp:156-165 each TCP session: TCP_NODELAY, SO_KEEPALIVE, setSocketKeepAliveParams, failures at debug 3 in a release build`,
|
|
5842
5842
|
rung: "implemented"
|
|
5843
5843
|
},
|
|
5844
5844
|
{
|
|
5845
|
-
ref: `${AT$
|
|
5845
|
+
ref: `${AT$12}/util/net/socket_utils.h:15-16 kMaxKeepIdleSecs 300 and kMaxKeepIntvlSecs 1, :19-22 the defaults of setSocketKeepAliveParams`,
|
|
5846
5846
|
rung: "implemented"
|
|
5847
5847
|
},
|
|
5848
5848
|
{
|
|
5849
|
-
ref: `${AT$
|
|
5849
|
+
ref: `${AT$12}/util/net/socket_utils.cpp:165-196 applyMax: read the option, and set the maximum only when the value is higher, :199-220 TCP_KEEPIDLE and TCP_KEEPINTVL, never TCP_KEEPCNT`,
|
|
5850
5850
|
rung: "implemented"
|
|
5851
5851
|
},
|
|
5852
5852
|
{
|
|
5853
|
-
ref: `${AT$
|
|
5853
|
+
ref: `${AT$12}/util/net/socket_utils.cpp:176-181 and :190-194 the log of a failed read or set, at the severity of the caller`,
|
|
5854
5854
|
rung: "implemented"
|
|
5855
5855
|
},
|
|
5856
5856
|
{
|
|
5857
|
-
ref: `${AT$
|
|
5857
|
+
ref: `${AT$12}/util/net/sock.cpp:135-142 the older socket path: SO_KEEPALIVE, then the same maximums, failures as errors`,
|
|
5858
5858
|
rung: "implemented"
|
|
5859
5859
|
},
|
|
5860
5860
|
{
|
|
5861
|
-
ref: `${AT$
|
|
5861
|
+
ref: `${AT$12}/db/repl/replication_info.cpp:131-143 an awaitable hello waits until now + maxAwaitTimeMS on the precise clock, or a change of the topology`,
|
|
5862
5862
|
rung: "implemented"
|
|
5863
5863
|
}
|
|
5864
5864
|
],
|
|
@@ -6020,7 +6020,7 @@ const MONGOD_SESSION = machineSchema.parse({
|
|
|
6020
6020
|
});
|
|
6021
6021
|
//#endregion
|
|
6022
6022
|
//#region src/mongo/mongodb-node.ts
|
|
6023
|
-
const AT$
|
|
6023
|
+
const AT$11 = "mongodb 7.7.0 src";
|
|
6024
6024
|
/**
|
|
6025
6025
|
* This document is the MongoDB Node driver 7.7.0, for one server of a replica set. It gives one
|
|
6026
6026
|
* connection of the driver by its role, and the timers that act on it. The roles are the monitor
|
|
@@ -6047,75 +6047,75 @@ const MONGODB_NODE = machineSchema.parse({
|
|
|
6047
6047
|
},
|
|
6048
6048
|
sources: [
|
|
6049
6049
|
{
|
|
6050
|
-
ref: `${AT$
|
|
6050
|
+
ref: `${AT$11}/connection_string.ts:804-807 connectTimeoutMS 30000, :850-853 heartbeatFrequencyMS 10000, :934-937 minHeartbeatFrequencyMS 500`,
|
|
6051
6051
|
rung: "implemented"
|
|
6052
6052
|
},
|
|
6053
6053
|
{
|
|
6054
|
-
ref: `${AT$
|
|
6054
|
+
ref: `${AT$11}/connection_string.ts:1100-1103 serverSelectionTimeoutMS 30000, :1107-1111 socketTimeoutMS 0, :1178-1182 waitQueueTimeoutMS 0`,
|
|
6055
6055
|
rung: "implemented"
|
|
6056
6056
|
},
|
|
6057
6057
|
{
|
|
6058
|
-
ref: `${AT$
|
|
6058
|
+
ref: `${AT$11}/connection_string.ts:896-898 maxConnecting 2, :906-908 maxIdleTimeMS 0, :910-912 maxPoolSize 100, :930-933 minPoolSize 0, :1075-1082 retryReads and retryWrites true, :1089-1091 serverMonitoringMode auto`,
|
|
6059
6059
|
rung: "implemented"
|
|
6060
6060
|
},
|
|
6061
6061
|
{
|
|
6062
|
-
ref: `${AT$
|
|
6062
|
+
ref: `${AT$11}/cmap/connect.ts:291 DEFAULT_KEEP_ALIVE_INITIAL_DELAY_MS 120000, :336-338 keepAlive and noDelay, :378-417 makeSocket: setKeepAlive, setNoDelay, setTimeout(connectTimeoutMS), :432-438 the connect timeout`,
|
|
6063
6063
|
rung: "implemented"
|
|
6064
6064
|
},
|
|
6065
6065
|
{
|
|
6066
|
-
ref: `${AT$
|
|
6066
|
+
ref: `${AT$11}/cmap/connect.ts:117-120 the handshake reads with socketTimeoutMS = connectTimeoutMS`,
|
|
6067
6067
|
rung: "implemented"
|
|
6068
6068
|
},
|
|
6069
6069
|
{
|
|
6070
|
-
ref: `${AT$
|
|
6070
|
+
ref: `${AT$11}/sdam/monitor.ts:245-259 the streaming protocol, :338-371 the awaitable hello: maxAwaitTimeMS = heartbeatFrequencyMS, socketTimeoutMS = connectTimeoutMS + maxAwaitTimeMS`,
|
|
6071
6071
|
rung: "implemented"
|
|
6072
6072
|
},
|
|
6073
6073
|
{
|
|
6074
|
-
ref: `${AT$
|
|
6074
|
+
ref: `${AT$11}/sdam/monitor.ts:273-293 a failed heartbeat: ResetPool, and InterruptInUseConnections for a timeout`,
|
|
6075
6075
|
rung: "implemented"
|
|
6076
6076
|
},
|
|
6077
6077
|
{
|
|
6078
|
-
ref: `${AT$
|
|
6078
|
+
ref: `${AT$11}/sdam/monitor.ts:175-194 reset: the next check after heartbeatFrequencyMS, :609-636 wake: no check sooner than minHeartbeatFrequencyMS, :668-691 the next check after heartbeatFrequencyMS`,
|
|
6079
6079
|
rung: "implemented"
|
|
6080
6080
|
},
|
|
6081
6081
|
{
|
|
6082
|
-
ref: `${AT$
|
|
6082
|
+
ref: `${AT$11}/sdam/monitor.ts:490-565 the RTT pinger: its own connection, a hello each heartbeatFrequencyMS, no socket timeout`,
|
|
6083
6083
|
rung: "implemented"
|
|
6084
6084
|
},
|
|
6085
6085
|
{
|
|
6086
|
-
ref: `${AT$
|
|
6086
|
+
ref: `${AT$11}/cmap/connection.ts:328-334 a socket timeout, 1 ms later, is a MongoNetworkTimeoutError, :461-505 the socket timeout of a command, set again at each reply`,
|
|
6087
6087
|
rung: "implemented"
|
|
6088
6088
|
},
|
|
6089
6089
|
{
|
|
6090
|
-
ref: `${AT$
|
|
6090
|
+
ref: `${AT$11}/sdam/server.ts:186 resetServer, :390-444 handleError, :450-515 decorateCommandError, :532-546 markServerUnknown: a network error that is not a timeout resets the monitor`,
|
|
6091
6091
|
rung: "implemented"
|
|
6092
6092
|
},
|
|
6093
6093
|
{
|
|
6094
|
-
ref: `${AT$
|
|
6094
|
+
ref: `${AT$11}/sdam/topology.ts:559 the selection timeout, :568-572 and :635-664 MongoServerSelectionError, :862-888 updateServers clears the pool, :1082-1089 a waiting selection wakes each monitor`,
|
|
6095
6095
|
rung: "implemented"
|
|
6096
6096
|
},
|
|
6097
6097
|
{
|
|
6098
|
-
ref: `${AT$
|
|
6098
|
+
ref: `${AT$11}/sdam/topology_description.ts:458-467 a primary that another primary replaces is Unknown, and nothing clears its pool`,
|
|
6099
6099
|
rung: "implemented"
|
|
6100
6100
|
},
|
|
6101
6101
|
{
|
|
6102
|
-
ref: `${AT$
|
|
6102
|
+
ref: `${AT$11}/cmap/connection_pool.ts:417-468 clear, :475-481 interruptInUseConnections: PoolClearedOnNetworkError, :584 a connection idle for maxIdleTimeMS is perished at the next check-out`,
|
|
6103
6103
|
rung: "implemented"
|
|
6104
6104
|
},
|
|
6105
6105
|
{
|
|
6106
|
-
ref: `${AT$
|
|
6106
|
+
ref: `${AT$11}/cmap/errors.ts:37-84 PoolClearedError and PoolClearedOnNetworkError, with the label PoolRequestedRetry`,
|
|
6107
6107
|
rung: "implemented"
|
|
6108
6108
|
},
|
|
6109
6109
|
{
|
|
6110
|
-
ref: `${AT$
|
|
6110
|
+
ref: `${AT$11}/operations/execute_operation.ts:252-279 two attempts for a retryable read or write, :375-380 the retry selects a server again, :442-445 canRetry`,
|
|
6111
6111
|
rung: "implemented"
|
|
6112
6112
|
},
|
|
6113
6113
|
{
|
|
6114
|
-
ref: `${AT$
|
|
6114
|
+
ref: `${AT$11}/error.ts:1377-1394 the retryable codes, :1431-1436 isRetryableWriteError: RetryableWriteError or PoolRequestedRetry`,
|
|
6115
6115
|
rung: "implemented"
|
|
6116
6116
|
},
|
|
6117
6117
|
{
|
|
6118
|
-
ref: `${AT$
|
|
6118
|
+
ref: `${AT$11}/timeout.ts:362-372 the legacy timeout context: the selection timeout, and no check-out timeout at waitQueueTimeoutMS 0`,
|
|
6119
6119
|
rung: "implemented"
|
|
6120
6120
|
},
|
|
6121
6121
|
{
|
|
@@ -7795,7 +7795,7 @@ const HIKARICP_PGJDBC = machineSchema.parse({
|
|
|
7795
7795
|
});
|
|
7796
7796
|
//#endregion
|
|
7797
7797
|
//#region src/pg/node-postgres.ts
|
|
7798
|
-
const AT$
|
|
7798
|
+
const AT$10 = "pg 8.23.1 lib";
|
|
7799
7799
|
const POOL = "pg-pool 3.14.0";
|
|
7800
7800
|
/**
|
|
7801
7801
|
* This document is node-postgres 8.23.1 (the npm package pg) with pg-pool 3.14.0, for one client
|
|
@@ -7837,75 +7837,75 @@ const NODE_POSTGRES = machineSchema.parse({
|
|
|
7837
7837
|
rung: "implemented"
|
|
7838
7838
|
},
|
|
7839
7839
|
{
|
|
7840
|
-
ref: `${AT$
|
|
7840
|
+
ref: `${AT$10}/defaults.js:42 max 10 and :46 idleTimeoutMillis 30000: no line of pg or pg-pool reads them, thus a pool does not use them`,
|
|
7841
7841
|
rung: "implemented"
|
|
7842
7842
|
},
|
|
7843
7843
|
{
|
|
7844
|
-
ref: `${AT$
|
|
7844
|
+
ref: `${AT$10}/defaults.js:65, :69, :73 and :76 statement_timeout, lock_timeout, idle_in_transaction_session_timeout and query_timeout are false`,
|
|
7845
7845
|
rung: "implemented"
|
|
7846
7846
|
},
|
|
7847
7847
|
{
|
|
7848
|
-
ref: `${AT$
|
|
7848
|
+
ref: `${AT$10}/defaults.js:63-76 the comments of pg: each of the four is in milliseconds, false is no limit, and query_timeout is on the client side`,
|
|
7849
7849
|
rung: "documented"
|
|
7850
7850
|
},
|
|
7851
7851
|
{
|
|
7852
|
-
ref: `${AT$
|
|
7852
|
+
ref: `${AT$10}/connection-parameters.js:9-23 val: the config, else the default of pg, :121-124 the three timeouts of the server and query_timeout, with no environment variable`,
|
|
7853
7853
|
rung: "implemented"
|
|
7854
7854
|
},
|
|
7855
7855
|
{
|
|
7856
|
-
ref: `${AT$
|
|
7856
|
+
ref: `${AT$10}/client.js:89-98 the Connection gets keepAlive false and keepAliveInitialDelayMillis 0 when the config does not give them, :116 connectionTimeoutMillis 0`,
|
|
7857
7857
|
rung: "implemented"
|
|
7858
7858
|
},
|
|
7859
7859
|
{
|
|
7860
|
-
ref: `${AT$
|
|
7860
|
+
ref: `${AT$10}/stream.js:20-24 and :78-83 outside Cloudflare Workers, the socket is a new net.Socket with no option`,
|
|
7861
7861
|
rung: "implemented"
|
|
7862
7862
|
},
|
|
7863
7863
|
{
|
|
7864
|
-
ref: `${AT$
|
|
7864
|
+
ref: `${AT$10}/connection.js:40-52 setNoDelay(true) before the connect, and setKeepAlive(true, keepAliveInitialDelayMillis) at the connect only when keepAlive is true, :54-65 the error and the close of the socket`,
|
|
7865
7865
|
rung: "implemented"
|
|
7866
7866
|
},
|
|
7867
7867
|
{
|
|
7868
|
-
ref: `${AT$
|
|
7868
|
+
ref: `${AT$10}/client.js:167-176 and :702-737 are the only timers of the client, and connection.js has none: the client sends nothing by itself on an idle connection`,
|
|
7869
7869
|
rung: "implemented"
|
|
7870
7870
|
},
|
|
7871
7871
|
{
|
|
7872
|
-
ref: `${AT$
|
|
7872
|
+
ref: `${AT$10}/client.js:153-230 _connect: no second connect, the connect timer of the client ('timeout expired'), and 'Connection terminated unexpectedly' for an end that the client did not ask for`,
|
|
7873
7873
|
rung: "implemented"
|
|
7874
7874
|
},
|
|
7875
7875
|
{
|
|
7876
|
-
ref: `${AT$
|
|
7876
|
+
ref: `${AT$10}/client.js:373-387 the first ReadyForQuery ends the connect and clears the timer, :398-423 an error before it goes to the connect callback, and an error after it makes the client unqueryable`,
|
|
7877
7877
|
rung: "implemented"
|
|
7878
7878
|
},
|
|
7879
7879
|
{
|
|
7880
|
-
ref: `${AT$
|
|
7880
|
+
ref: `${AT$10}/client.js:426-442 an ErrorResponse fails the active query only, and with no active query it is an error of the client`,
|
|
7881
7881
|
rung: "implemented"
|
|
7882
7882
|
},
|
|
7883
7883
|
{
|
|
7884
|
-
ref: `${AT$
|
|
7884
|
+
ref: `${AT$10}/connection.js:137-145 and pg-protocol 1.16.1 dist/parser.js:142-144, :296-323 an ErrorResponse is a DatabaseError, with the severity and the code that the server gives`,
|
|
7885
7885
|
rung: "implemented"
|
|
7886
7886
|
},
|
|
7887
7887
|
{
|
|
7888
|
-
ref: `${AT$
|
|
7888
|
+
ref: `${AT$10}/client.js:133-151 _errorAllQueries: each query of the client fails with the same error, on the next tick`,
|
|
7889
7889
|
rung: "implemented"
|
|
7890
7890
|
},
|
|
7891
7891
|
{
|
|
7892
|
-
ref: `${AT$
|
|
7892
|
+
ref: `${AT$10}/query.js:122-150 a query gives its error or its result to its callback, at the error or at the ReadyForQuery`,
|
|
7893
7893
|
rung: "implemented"
|
|
7894
7894
|
},
|
|
7895
7895
|
{
|
|
7896
|
-
ref: `${AT$
|
|
7896
|
+
ref: `${AT$10}/client.js:702-737 query_timeout: a Node timer for each query, 'Query read timeout'. The client sends no cancel, and it keeps the active query`,
|
|
7897
7897
|
rung: "implemented"
|
|
7898
7898
|
},
|
|
7899
7899
|
{
|
|
7900
|
-
ref: `${AT$
|
|
7900
|
+
ref: `${AT$10}/client.js:616-641 the next query goes only after a ReadyForQuery, :765-777 a query on an unqueryable or ended client fails at once`,
|
|
7901
7901
|
rung: "implemented"
|
|
7902
7902
|
},
|
|
7903
7903
|
{
|
|
7904
|
-
ref: `${AT$
|
|
7904
|
+
ref: `${AT$10}/client.js:799-836 end: a dead socket or an active query destroys the socket, else connection.js:217-227 sends Terminate and ends the socket`,
|
|
7905
7905
|
rung: "implemented"
|
|
7906
7906
|
},
|
|
7907
7907
|
{
|
|
7908
|
-
ref: `${AT$
|
|
7908
|
+
ref: `${AT$10}/client.js:543-572 getStartupConf: statement_timeout, lock_timeout and idle_in_transaction_session_timeout go to the server only when they are set`,
|
|
7909
7909
|
rung: "implemented"
|
|
7910
7910
|
},
|
|
7911
7911
|
{
|
|
@@ -10301,7 +10301,7 @@ const PGPOOL_SESSION = machineSchema.parse({
|
|
|
10301
10301
|
});
|
|
10302
10302
|
//#endregion
|
|
10303
10303
|
//#region src/pg/postgres-session.ts
|
|
10304
|
-
const AT$
|
|
10304
|
+
const AT$9 = "postgresql REL_17_11 src";
|
|
10305
10305
|
const DOC = "postgresql REL_17_11 doc/src/sgml";
|
|
10306
10306
|
/**
|
|
10307
10307
|
* This document is the hold of a PostgreSQL 17.11 backend on one client connection, over its TCP
|
|
@@ -10341,163 +10341,163 @@ const POSTGRES_SESSION = machineSchema.parse({
|
|
|
10341
10341
|
rung: "implemented"
|
|
10342
10342
|
},
|
|
10343
10343
|
{
|
|
10344
|
-
ref: `${AT$
|
|
10344
|
+
ref: `${AT$9}/backend/tcop/backend_startup.c:157-161 BackendInitialize calls pq_init in the backend, before the startup packet`,
|
|
10345
10345
|
rung: "implemented"
|
|
10346
10346
|
},
|
|
10347
10347
|
{
|
|
10348
|
-
ref: `${AT$
|
|
10348
|
+
ref: `${AT$9}/backend/libpq/pqcomm.c:793-817 AcceptConnection in the postmaster, :180 the Port starts at zeros, :195-220 TCP_NODELAY and SO_KEEPALIVE on each socket that is not AF_UNIX, a failure is FATAL, :264-274 then the four TCP GUCs, a failure is a LOG only`,
|
|
10349
10349
|
rung: "implemented"
|
|
10350
10350
|
},
|
|
10351
10351
|
{
|
|
10352
|
-
ref: `${AT$
|
|
10352
|
+
ref: `${AT$9}/backend/libpq/pqcomm.c:1663-1711 pq_setkeepalivesidle: no call at a value equal to the Port's, and 0 sets the value that getsockopt read first; :1748-1795, :1827-1870 and :1902-1945 the same for TCP_KEEPINTVL, TCP_KEEPCNT and TCP_USER_TIMEOUT`,
|
|
10353
10353
|
rung: "implemented"
|
|
10354
10354
|
},
|
|
10355
10355
|
{
|
|
10356
|
-
ref: `${AT$
|
|
10356
|
+
ref: `${AT$9}/backend/libpq/pqcomm.c:87-90 TCP_KEEPIDLE on Linux, :1947-2047 an assign hook sets the socket of the session at once, and a show hook reads the kernel`,
|
|
10357
10357
|
rung: "implemented"
|
|
10358
10358
|
},
|
|
10359
10359
|
{
|
|
10360
|
-
ref: `${AT$
|
|
10360
|
+
ref: `${AT$9}/backend/utils/misc/guc_tables.c:3452-3461 tcp_keepalives_idle 0 s, :3463-3472 tcp_keepalives_interval 0 s, :3485-3495 tcp_keepalives_count 0, :3587-3596 tcp_user_timeout 0 ms: each PGC_USERSET, 0 to INT_MAX, 0 is the system default`,
|
|
10361
10361
|
rung: "implemented"
|
|
10362
10362
|
},
|
|
10363
10363
|
{
|
|
10364
|
-
ref: `${AT$
|
|
10364
|
+
ref: `${AT$9}/backend/utils/misc/guc_tables.c:2611-2620 statement_timeout, :2622-2631 lock_timeout, :2633-2642 idle_in_transaction_session_timeout, :2644-2653 transaction_timeout, :2655-2664 idle_session_timeout: each 0 ms, 0 to INT_MAX, PGC_USERSET, 0 turns it off`,
|
|
10365
10365
|
rung: "implemented"
|
|
10366
10366
|
},
|
|
10367
10367
|
{
|
|
10368
|
-
ref: `${AT$
|
|
10368
|
+
ref: `${AT$9}/backend/utils/misc/guc_tables.c:2774-2783 authentication_timeout 60 s, 1 to 600, PGC_SIGHUP; :3632-3641 client_connection_check_interval 0 ms, 0 to INT_MAX, PGC_USERSET`,
|
|
10369
10369
|
rung: "implemented"
|
|
10370
10370
|
},
|
|
10371
10371
|
{
|
|
10372
|
-
ref: `${AT$
|
|
10372
|
+
ref: `${AT$9}/backend/storage/lmgr/proc.c:58-62, backend/tcop/postgres.c:106 and backend/postmaster/postmaster.c:228 the C defaults agree: 0 ms for each timeout, 0 ms for the client check, 60 s for authentication`,
|
|
10373
10373
|
rung: "implemented"
|
|
10374
10374
|
},
|
|
10375
10375
|
{
|
|
10376
|
-
ref: `${AT$
|
|
10376
|
+
ref: `${AT$9}/include/utils/timeout.h:3-4 and :23-43 one SIGALRM for each timeout id, STARTUP_PACKET_TIMEOUT to CLIENT_CONNECTION_CHECK_TIMEOUT`,
|
|
10377
10377
|
rung: "implemented"
|
|
10378
10378
|
},
|
|
10379
10379
|
{
|
|
10380
|
-
ref: `${AT$
|
|
10380
|
+
ref: `${AT$9}/backend/utils/misc/timeout.c:559-575 enable_timeout_after: the deadline is the current time + the delay in ms, :209-350 schedule_alarm: setitimer(ITIMER_REAL) for the nearest deadline, :363-453 handle_sig_alarm sets the latch and calls each handler that is due`,
|
|
10381
10381
|
rung: "implemented"
|
|
10382
10382
|
},
|
|
10383
10383
|
{
|
|
10384
|
-
ref: `${AT$
|
|
10384
|
+
ref: `${AT$9}/backend/utils/init/postinit.c:770-782 the handlers of a backend, :1374-1407 the statement timer sends SIGINT, or SIGTERM in authentication, and the lock timer sends SIGINT, :1409-1447 each other handler sets a flag and the latch`,
|
|
10385
10385
|
rung: "implemented"
|
|
10386
10386
|
},
|
|
10387
10387
|
{
|
|
10388
|
-
ref: `${AT$
|
|
10388
|
+
ref: `${AT$9}/backend/tcop/postgres.c:2999-3023 die (SIGTERM) sets ProcDiePending, :3029-3043 StatementCancelHandler (SIGINT) sets QueryCancelPending, :4292-4294 the two handlers`,
|
|
10389
10389
|
rung: "implemented"
|
|
10390
10390
|
},
|
|
10391
10391
|
{
|
|
10392
|
-
ref: `${AT$
|
|
10392
|
+
ref: `${AT$9}/backend/tcop/postgres.c:3271-3319 ProcessInterrupts acts on a die request first: FATAL 57014 "canceling authentication due to timeout" in authentication, else FATAL 57P01 "terminating connection due to administrator command"`,
|
|
10393
10393
|
rung: "implemented"
|
|
10394
10394
|
},
|
|
10395
10395
|
{
|
|
10396
|
-
ref: `${AT$
|
|
10396
|
+
ref: `${AT$9}/backend/tcop/postgres.c:3321-3350 then the client check, then a lost connection: FATAL 08006 "connection to client lost", with no message to the client`,
|
|
10397
10397
|
rung: "implemented"
|
|
10398
10398
|
},
|
|
10399
10399
|
{
|
|
10400
|
-
ref: `${AT$
|
|
10400
|
+
ref: `${AT$9}/backend/tcop/postgres.c:3372-3430 a cancel: ERROR 55P03 "canceling statement due to lock timeout", ERROR 57014 "canceling statement due to statement timeout"`,
|
|
10401
10401
|
rung: "implemented"
|
|
10402
10402
|
},
|
|
10403
10403
|
{
|
|
10404
|
-
ref: `${AT$
|
|
10404
|
+
ref: `${AT$9}/backend/tcop/postgres.c:3435-3477 FATAL 25P03 "terminating connection due to idle-in-transaction timeout", FATAL 25P04 "terminating connection due to transaction timeout", FATAL 57P05 "terminating connection due to idle-session timeout"`,
|
|
10405
10405
|
rung: "implemented"
|
|
10406
10406
|
},
|
|
10407
10407
|
{
|
|
10408
|
-
ref: `${AT$
|
|
10408
|
+
ref: `${AT$9}/backend/utils/errcodes.txt:106-107 08003 and 08006, :111 08P01, :254-255 25P03 and 25P04, :421 55P03, :428-429 57014 and 57P01, :433 57P05`,
|
|
10409
10409
|
rung: "implemented"
|
|
10410
10410
|
},
|
|
10411
10411
|
{
|
|
10412
|
-
ref: `${AT$
|
|
10412
|
+
ref: `${AT$9}/backend/tcop/postgres.c:4618-4706 at ReadyForQuery the backend arms idle_in_transaction_session_timeout in a transaction block, open or aborted, and idle_session_timeout outside one; :4714-4750 after a message it disarms them, then checks for interrupts`,
|
|
10413
10413
|
rung: "implemented"
|
|
10414
10414
|
},
|
|
10415
10415
|
{
|
|
10416
|
-
ref: `${AT$
|
|
10416
|
+
ref: `${AT$9}/backend/tcop/postgres.c:2770-2796 start_xact_command arms statement_timeout and the client check, each only when not active, :2798-2802 finish_xact_command disarms statement_timeout, :5251-5278 no statement timer when statement_timeout >= transaction_timeout > 0`,
|
|
10417
10417
|
rung: "implemented"
|
|
10418
10418
|
},
|
|
10419
10419
|
{
|
|
10420
|
-
ref: `${AT$
|
|
10420
|
+
ref: `${AT$9}/backend/utils/adt/misc.c:391-412 pg_sleep: CHECK_FOR_INTERRUPTS before each WaitLatch on the latch of the backend, thus the SIGALRM of a timeout ends its wait`,
|
|
10421
10421
|
rung: "implemented"
|
|
10422
10422
|
},
|
|
10423
10423
|
{
|
|
10424
|
-
ref: `${AT$
|
|
10424
|
+
ref: `${AT$9}/backend/tcop/postgres.c:4446-4502 an ERROR: disable_all_timeouts, the error to the client, AbortCurrentTransaction; :4562-4563 then ReadyForQuery`,
|
|
10425
10425
|
rung: "implemented"
|
|
10426
10426
|
},
|
|
10427
10427
|
{
|
|
10428
|
-
ref: `${AT$
|
|
10428
|
+
ref: `${AT$9}/backend/access/transam/xact.c:2174-2176 StartTransaction arms transaction_timeout, :2315-2317, :2592-2594 and :2768-2770 commit, prepare and abort disarm it, :3472-3477 an error in a transaction block aborts the transaction and keeps the block`,
|
|
10429
10429
|
rung: "implemented"
|
|
10430
10430
|
},
|
|
10431
10431
|
{
|
|
10432
|
-
ref: `${AT$
|
|
10432
|
+
ref: `${AT$9}/backend/storage/lmgr/proc.c:1292-1307 ProcSleep arms lock_timeout with the deadlock timer, :1652-1666 and disarms it after the wait`,
|
|
10433
10433
|
rung: "implemented"
|
|
10434
10434
|
},
|
|
10435
10435
|
{
|
|
10436
|
-
ref: `${AT$
|
|
10436
|
+
ref: `${AT$9}/backend/tcop/postgres.c:3652-3661 a client_connection_check_interval above 0 needs a wait set that reports a close`,
|
|
10437
10437
|
rung: "implemented"
|
|
10438
10438
|
},
|
|
10439
10439
|
{
|
|
10440
|
-
ref: `${AT$
|
|
10440
|
+
ref: `${AT$9}/backend/libpq/pqcomm.c:2049-2084 pq_check_connection: a wait of 0 ms for WL_SOCKET_CLOSED`,
|
|
10441
10441
|
rung: "implemented"
|
|
10442
10442
|
},
|
|
10443
10443
|
{
|
|
10444
|
-
ref: `${AT$
|
|
10444
|
+
ref: `${AT$9}/backend/storage/ipc/latch.c:72-85 epoll where sys/epoll.h exists, :1131-1156 WL_SOCKET_CLOSED adds EPOLLRDHUP, and EPOLLERR and EPOLLHUP are always on, :1661-1680 EPOLLERR or EPOLLHUP make the socket readable, writable and closed, :2253-2263 epoll can report a close`,
|
|
10445
10445
|
rung: "implemented"
|
|
10446
10446
|
},
|
|
10447
10447
|
{
|
|
10448
|
-
ref: `${AT$
|
|
10448
|
+
ref: `${AT$9}/backend/libpq/be-secure.c:174-261 secure_read and :300-370 secure_write: a wait for the socket or the latch with no timeout; at the latch, ProcessClientReadInterrupt or ProcessClientWriteInterrupt; :234-237 and :343-346 FATAL 57P01 at the death of the postmaster`,
|
|
10449
10449
|
rung: "implemented"
|
|
10450
10450
|
},
|
|
10451
10451
|
{
|
|
10452
|
-
ref: `${AT$
|
|
10452
|
+
ref: `${AT$9}/backend/tcop/postgres.c:513-548 ProcessClientReadInterrupt: each interrupt in the wait for a command, a die request in another read; :559-600 ProcessClientWriteInterrupt: a die request only, with no message to the client`,
|
|
10453
10453
|
rung: "implemented"
|
|
10454
10454
|
},
|
|
10455
10455
|
{
|
|
10456
|
-
ref: `${AT$
|
|
10456
|
+
ref: `${AT$9}/backend/libpq/pqcomm.c:287-297 the socket has O_NONBLOCK, and the latch gives the waits; :896-956 pq_recvbuf: 0 bytes or an error is EOF, and an error logs COMMERROR "could not receive data from client: %m"`,
|
|
10457
10457
|
rung: "implemented"
|
|
10458
10458
|
},
|
|
10459
10459
|
{
|
|
10460
|
-
ref: `${AT$
|
|
10460
|
+
ref: `${AT$9}/backend/tcop/postgres.c:364-396 SocketBackend: EOF in a transaction logs COMMERROR 08006 "unexpected EOF on client connection with an open transaction", else DEBUG1 08003; :4988-5016 EOF or Terminate: proc_exit(0)`,
|
|
10461
10461
|
rung: "implemented"
|
|
10462
10462
|
},
|
|
10463
10463
|
{
|
|
10464
|
-
ref: `${AT$
|
|
10464
|
+
ref: `${AT$9}/backend/access/transam/xact.c:383-396 IsTransactionState is TRANS_INPROGRESS only; backend/utils/init/postinit.c:1360-1371 ShutdownPostgres aborts the transaction at exit`,
|
|
10465
10465
|
rung: "implemented"
|
|
10466
10466
|
},
|
|
10467
10467
|
{
|
|
10468
|
-
ref: `${AT$
|
|
10468
|
+
ref: `${AT$9}/backend/libpq/pqcomm.c:1275-1336 a full buffer flushes, and the flush waits for the socket, :1358-1423 internal_flush_buffer: an error logs COMMERROR "could not send data to client: %m" once for each errno, drops the buffer and sets ClientConnectionLost`,
|
|
10469
10469
|
rung: "implemented"
|
|
10470
10470
|
},
|
|
10471
10471
|
{
|
|
10472
|
-
ref: `${AT$
|
|
10472
|
+
ref: `${AT$9}/backend/tcop/postgres.c:4310-4316 the backend ignores SIGPIPE`,
|
|
10473
10473
|
rung: "implemented"
|
|
10474
10474
|
},
|
|
10475
10475
|
{
|
|
10476
|
-
ref: `${AT$
|
|
10476
|
+
ref: `${AT$9}/include/utils/elog.h:31-38 COMMERROR is LOG_SERVER_ONLY; backend/utils/error/elog.c:205-228 it goes to the log at log_min_messages WARNING (guc_tables.c:534), and DEBUG1 does not`,
|
|
10477
10477
|
rung: "implemented"
|
|
10478
10478
|
},
|
|
10479
10479
|
{
|
|
10480
|
-
ref: `${AT$
|
|
10480
|
+
ref: `${AT$9}/backend/utils/error/elog.c:245-262 and :1726-1732 an error goes to the client while the output is DestRemote, :3643-3651 the backend flushes it, :559-590 FATAL ends the process with proc_exit(1)`,
|
|
10481
10481
|
rung: "implemented"
|
|
10482
10482
|
},
|
|
10483
10483
|
{
|
|
10484
|
-
ref: `${AT$
|
|
10484
|
+
ref: `${AT$9}/backend/libpq/pqcomm.c:347-392 socket_close keeps the socket open until the process exits`,
|
|
10485
10485
|
rung: "implemented"
|
|
10486
10486
|
},
|
|
10487
10487
|
{
|
|
10488
|
-
ref: `${AT$
|
|
10488
|
+
ref: `${AT$9}/backend/tcop/backend_startup.c:237-253 the startup timer: authentication_timeout, after the DNS lookup, :311-314 the end of the startup packet disarms it, :895-922 its handler and SIGTERM call _exit(1), with no log and no message`,
|
|
10489
10489
|
rung: "implemented"
|
|
10490
10490
|
},
|
|
10491
10491
|
{
|
|
10492
|
-
ref: `${AT$
|
|
10492
|
+
ref: `${AT$9}/backend/tcop/backend_startup.c:460-519 ProcessStartupPacket: no byte is a silent end, a part of a packet logs COMMERROR 08P01 "incomplete startup packet"; :328-333 proc_exit(0)`,
|
|
10493
10493
|
rung: "implemented"
|
|
10494
10494
|
},
|
|
10495
10495
|
{
|
|
10496
|
-
ref: `${AT$
|
|
10496
|
+
ref: `${AT$9}/backend/utils/init/postinit.c:235-251 PerformAuthentication arms the statement timer at authentication_timeout * 1000 ms, :305 ClientAuthInProgress ends after it, :1210-1215 the GUCs of the startup packet apply after it`,
|
|
10497
10497
|
rung: "implemented"
|
|
10498
10498
|
},
|
|
10499
10499
|
{
|
|
10500
|
-
ref: `${AT$
|
|
10500
|
+
ref: `${AT$9}/backend/libpq/auth.c:260-271 an EOF from the client in authentication: proc_exit(0), with no log; :714-744 recv_password_packet gives an EOF as NULL`,
|
|
10501
10501
|
rung: "implemented"
|
|
10502
10502
|
},
|
|
10503
10503
|
{
|
|
@@ -11906,11 +11906,11 @@ const SUPAVISOR_SERVER = machineSchema.parse({
|
|
|
11906
11906
|
* of the transports gives the timers.
|
|
11907
11907
|
*/
|
|
11908
11908
|
/** This text is the folder of the WebSocket transports at the commit of the subject. */
|
|
11909
|
-
const AT$
|
|
11909
|
+
const AT$8 = "client 2408cea packages/client/src/adapters/websocket";
|
|
11910
11910
|
/** This text is the client transport at that commit. */
|
|
11911
|
-
const CT = `${AT$
|
|
11911
|
+
const CT = `${AT$8}/client/transport.ts`;
|
|
11912
11912
|
/** This text is the server transport at that commit. */
|
|
11913
|
-
const ST = `${AT$
|
|
11913
|
+
const ST$1 = `${AT$8}/server/transport.ts`;
|
|
11914
11914
|
/** This text is the source of the version of the service that the lock of the client gives (pnpm-lock.yaml:443-454). */
|
|
11915
11915
|
const SERVICE = "@mark1russell7/service 0.5.8 (systems 571e9e5) packages/service/src";
|
|
11916
11916
|
/** This function gives the arithmetic of a duration in ms. */
|
|
@@ -11990,7 +11990,7 @@ const PROCEDURES_WS_CLIENT = machineSchema.parse({
|
|
|
11990
11990
|
rung: "implemented"
|
|
11991
11991
|
},
|
|
11992
11992
|
{
|
|
11993
|
-
ref: `node v24.21.0 deps/undici/src/lib/core/connect.js:120-129 setKeepAlive(true, 60000); deps/uv/src/unix/tcp.c:591-593 uv_tcp_keepalive: 1 s and 10 probes. The ws package sets no keepalive on its socket (ws 8.22.0 lib/websocket.js:260-261), and the transport gives the class only the URL (${CT}:325, ${AT$
|
|
11993
|
+
ref: `node v24.21.0 deps/undici/src/lib/core/connect.js:120-129 setKeepAlive(true, 60000); deps/uv/src/unix/tcp.c:591-593 uv_tcp_keepalive: 1 s and 10 probes. The ws package sets no keepalive on its socket (ws 8.22.0 lib/websocket.js:260-261), and the transport gives the class only the URL (${CT}:325, ${AT$8}/client/node.ts:30-34).`,
|
|
11994
11994
|
rung: "implemented"
|
|
11995
11995
|
},
|
|
11996
11996
|
{
|
|
@@ -12390,7 +12390,7 @@ const PROCEDURES_WS_SERVER = machineSchema.parse({
|
|
|
12390
12390
|
},
|
|
12391
12391
|
sources: [
|
|
12392
12392
|
{
|
|
12393
|
-
ref: `${ST}:146-152 (the heartbeat: interval and misses, or false), :155-175 beat(): terminate after misses (:163-167), or count a miss and ping (:168-173); :232-236 setInterval of the interval; :429 a pong sets the misses to 0`,
|
|
12393
|
+
ref: `${ST$1}:146-152 (the heartbeat: interval and misses, or false), :155-175 beat(): terminate after misses (:163-167), or count a miss and ping (:168-173); :232-236 setInterval of the interval; :429 a pong sets the misses to 0`,
|
|
12394
12394
|
rung: "implemented"
|
|
12395
12395
|
},
|
|
12396
12396
|
{
|
|
@@ -12398,11 +12398,15 @@ const PROCEDURES_WS_SERVER = machineSchema.parse({
|
|
|
12398
12398
|
rung: "implemented"
|
|
12399
12399
|
},
|
|
12400
12400
|
{
|
|
12401
|
-
ref: `${ST}:523-527: a ping of a client gets a pong`,
|
|
12401
|
+
ref: `${ST$1}:523-527: a ping of a client gets a pong`,
|
|
12402
12402
|
rung: "implemented"
|
|
12403
12403
|
},
|
|
12404
12404
|
{
|
|
12405
|
-
ref: `node v24.21.0 lib/_http_server.js:646-651 and lib/net.js:2753-2756: keepAlive of http.Server is off at the default, thus an accepted socket has no SO_KEEPALIVE. The transport takes the upgrades of the server of its host (${ST}:187-230) and sets no option of a socket`,
|
|
12405
|
+
ref: `node v24.21.0 lib/_http_server.js:646-651 and lib/net.js:2753-2756: keepAlive of http.Server is off at the default, thus an accepted socket has no SO_KEEPALIVE. The transport takes the upgrades of the server of its host (${ST$1}:187-230) and sets no option of a socket`,
|
|
12406
|
+
rung: "implemented"
|
|
12407
|
+
},
|
|
12408
|
+
{
|
|
12409
|
+
ref: "ws 8.22.0 lib/websocket-server.js:372, :431 an upgrade gives its socket to setSocket(); lib/websocket.js:267 and :1398-1404 an end of file of that socket ends it at once: a FIN back",
|
|
12406
12410
|
rung: "implemented"
|
|
12407
12411
|
}
|
|
12408
12412
|
],
|
|
@@ -12431,6 +12435,10 @@ const PROCEDURES_WS_SERVER = machineSchema.parse({
|
|
|
12431
12435
|
kind: "peer",
|
|
12432
12436
|
note: "the close event of the socket of ws"
|
|
12433
12437
|
},
|
|
12438
|
+
"rx.fin": {
|
|
12439
|
+
kind: "peer",
|
|
12440
|
+
note: "the end event of the socket of ws: the peer sent a FIN"
|
|
12441
|
+
},
|
|
12434
12442
|
"socket.error": {
|
|
12435
12443
|
kind: "local",
|
|
12436
12444
|
note: "the kernel beneath gave up on the socket, or a reset arrived"
|
|
@@ -12507,7 +12515,7 @@ const PROCEDURES_WS_SERVER = machineSchema.parse({
|
|
|
12507
12515
|
on: "rx.ping",
|
|
12508
12516
|
to: "OPEN",
|
|
12509
12517
|
emits: ["tx.pong"],
|
|
12510
|
-
source: `${ST}:523-527`
|
|
12518
|
+
source: `${ST$1}:523-527`
|
|
12511
12519
|
},
|
|
12512
12520
|
{
|
|
12513
12521
|
id: "ps.terminate",
|
|
@@ -12516,7 +12524,16 @@ const PROCEDURES_WS_SERVER = machineSchema.parse({
|
|
|
12516
12524
|
to: "CLOSED",
|
|
12517
12525
|
timer: "heartbeat",
|
|
12518
12526
|
emits: ["tx.fin"],
|
|
12519
|
-
source: `${ST}:163-167`
|
|
12527
|
+
source: `${ST$1}:163-167`
|
|
12528
|
+
},
|
|
12529
|
+
{
|
|
12530
|
+
id: "ps.peer-end",
|
|
12531
|
+
from: ["OPEN", "MISSING"],
|
|
12532
|
+
on: "rx.fin",
|
|
12533
|
+
to: "CLOSED",
|
|
12534
|
+
emits: ["tx.fin"],
|
|
12535
|
+
note: "socketOnEnd: ws ends its side of the socket at once",
|
|
12536
|
+
source: "ws 8.22.0 lib/websocket.js:1398-1404"
|
|
12520
12537
|
},
|
|
12521
12538
|
{
|
|
12522
12539
|
id: "ps.close",
|
|
@@ -12537,7 +12554,7 @@ const PROCEDURES_WS_SERVER = machineSchema.parse({
|
|
|
12537
12554
|
});
|
|
12538
12555
|
//#endregion
|
|
12539
12556
|
//#region src/proxy/caddy.ts
|
|
12540
|
-
const AT$
|
|
12557
|
+
const AT$7 = "caddy v2.11.7";
|
|
12541
12558
|
const XNET = "x/net v0.59.0";
|
|
12542
12559
|
/**
|
|
12543
12560
|
* This document is Caddy 2.11.7 as an HTTP/2 proxy of gRPC, for one connection of a client. Its
|
|
@@ -12563,11 +12580,11 @@ const CADDY_HTTP2 = machineSchema.parse({
|
|
|
12563
12580
|
},
|
|
12564
12581
|
sources: [
|
|
12565
12582
|
{
|
|
12566
|
-
ref: `${AT$
|
|
12583
|
+
ref: `${AT$7} modules/caddyhttp/app.go:404-418, :925-940 the defaults of a server: idle_timeout 5 min, read_header_timeout 1 min, read_idle_timeout 1 min, write_idle_timeout 1 min`,
|
|
12567
12584
|
rung: "implemented"
|
|
12568
12585
|
},
|
|
12569
12586
|
{
|
|
12570
|
-
ref: `${AT$
|
|
12587
|
+
ref: `${AT$7} modules/caddyhttp/app.go:520-533 the protocol h2c: http2.ConfigureServer with a zero http2.Server of ${XNET}`,
|
|
12571
12588
|
rung: "implemented"
|
|
12572
12589
|
},
|
|
12573
12590
|
{
|
|
@@ -12587,15 +12604,15 @@ const CADDY_HTTP2 = machineSchema.parse({
|
|
|
12587
12604
|
rung: "implemented"
|
|
12588
12605
|
},
|
|
12589
12606
|
{
|
|
12590
|
-
ref: `${AT$
|
|
12607
|
+
ref: `${AT$7} modules/caddyhttp/reverseproxy/reverseproxy.go:1086, :1107-1112, :1393-1397, :1667-1697 a failure of the upstream before the headers of a response: no retry at the defaults, and statusError gives 502`,
|
|
12591
12608
|
rung: "implemented"
|
|
12592
12609
|
},
|
|
12593
12610
|
{
|
|
12594
|
-
ref: `${AT$
|
|
12611
|
+
ref: `${AT$7} modules/caddyhttp/reverseproxy/reverseproxy.go:1331-1352 and ${XNET} xs:2296-2310 after the headers, a failed copy panics with http.ErrAbortHandler, and the stream gets RST_STREAM INTERNAL_ERROR`,
|
|
12595
12612
|
rung: "implemented"
|
|
12596
12613
|
},
|
|
12597
12614
|
{
|
|
12598
|
-
ref: `${AT$
|
|
12615
|
+
ref: `${AT$7} modules/caddyhttp/reverseproxy/httptransport.go:212-226 the defaults of the transport: a dial timeout of 3 s, and an idle upstream connection closes after 2 min`,
|
|
12599
12616
|
rung: "implemented"
|
|
12600
12617
|
},
|
|
12601
12618
|
{
|
|
@@ -12603,11 +12620,11 @@ const CADDY_HTTP2 = machineSchema.parse({
|
|
|
12603
12620
|
rung: "implemented"
|
|
12604
12621
|
},
|
|
12605
12622
|
{
|
|
12606
|
-
ref: `${AT$
|
|
12623
|
+
ref: `${AT$7} modules/caddyhttp/app.go:136-142, :753-799, :862-876 a stop calls Shutdown on each server: a GOAWAY at once, and the grace period is eternal at the defaults. Caddy closes no connection by itself`,
|
|
12607
12624
|
rung: "implemented"
|
|
12608
12625
|
},
|
|
12609
12626
|
{
|
|
12610
|
-
ref: `${AT$
|
|
12627
|
+
ref: `${AT$7} modules/caddyhttp/app.go:570-577 and go1.26.8 src/net/tcpsock.go:291-296 each accepted socket gets the TCP keepalive of Go: 15 s, 15 s and 9 probes`,
|
|
12611
12628
|
rung: "implemented"
|
|
12612
12629
|
}
|
|
12613
12630
|
],
|
|
@@ -12898,7 +12915,7 @@ const CADDY_HTTP2 = machineSchema.parse({
|
|
|
12898
12915
|
});
|
|
12899
12916
|
//#endregion
|
|
12900
12917
|
//#region src/proxy/envoy.ts
|
|
12901
|
-
const AT$
|
|
12918
|
+
const AT$6 = "envoy v1.39.4";
|
|
12902
12919
|
/**
|
|
12903
12920
|
* This document is Envoy 1.39.4 as an HTTP/2 proxy of gRPC, for one connection of a client. Its static
|
|
12904
12921
|
* configuration is the one of the harness. It has one listener with the HTTP connection manager, one
|
|
@@ -12923,67 +12940,67 @@ const ENVOY_HTTP2 = machineSchema.parse({
|
|
|
12923
12940
|
},
|
|
12924
12941
|
sources: [
|
|
12925
12942
|
{
|
|
12926
|
-
ref: `${AT$
|
|
12943
|
+
ref: `${AT$6} source/common/runtime/runtime_features.cc:274-276 the codec of HTTP/2 is nghttp2: http2_use_oghttp2 is false`,
|
|
12927
12944
|
rung: "implemented"
|
|
12928
12945
|
},
|
|
12929
12946
|
{
|
|
12930
|
-
ref: `${AT$
|
|
12947
|
+
ref: `${AT$6} hutil.cc:746-777, :805-808 a local reply to a gRPC request is a response of trailers only: :status 200, grpc-status and grpc-message`,
|
|
12931
12948
|
rung: "implemented"
|
|
12932
12949
|
},
|
|
12933
12950
|
{
|
|
12934
|
-
ref: `${AT$
|
|
12951
|
+
ref: `${AT$6} source/common/grpc/status.cc:6-26 the status of an HTTP code: 429, 502, 503 and 504 give UNAVAILABLE, and an unknown code gives UNKNOWN`,
|
|
12935
12952
|
rung: "implemented"
|
|
12936
12953
|
},
|
|
12937
12954
|
{
|
|
12938
|
-
ref: `${AT$
|
|
12955
|
+
ref: `${AT$6} source/common/http/filter_manager.cc:1120-1127, cm.cc:301-313 and h2.cc:193-199 after the headers of the response, a local reply resets the stream with INTERNAL_ERROR`,
|
|
12939
12956
|
rung: "implemented"
|
|
12940
12957
|
},
|
|
12941
12958
|
{
|
|
12942
|
-
ref: `${AT$
|
|
12959
|
+
ref: `${AT$6} api/envoy/config/route/v3/route_components.proto:1373-1384 and source/common/router/config_impl.h:976 the timeout of a route: 15 s when it is not given`,
|
|
12943
12960
|
rung: "implemented"
|
|
12944
12961
|
},
|
|
12945
12962
|
{
|
|
12946
|
-
ref: `${AT$
|
|
12963
|
+
ref: `${AT$6} router.cc:180-266, :1309-1331, :1530-1572 the timer of the route starts at the end of the request, and its end gives the local reply 504 "upstream request timeout". The flag grpc_timeout_returns_deadline_exceeded is false (runtime_features.cc:242-244)`,
|
|
12947
12964
|
rung: "implemented"
|
|
12948
12965
|
},
|
|
12949
12966
|
{
|
|
12950
|
-
ref: `${AT$
|
|
12967
|
+
ref: `${AT$6} route_components.proto:1114-1118 and cm.cc:1731-1772 Envoy reads grpc-timeout only with grpc_timeout_header_max. At the defaults it forwards the header and does not act on it`,
|
|
12951
12968
|
rung: "implemented"
|
|
12952
12969
|
},
|
|
12953
12970
|
{
|
|
12954
|
-
ref: `${AT$
|
|
12971
|
+
ref: `${AT$6} source/common/http/codec_client.cc:124-144 and router.cc:1574-1581, :1681-1712 a reset of the upstream connection resets each stream on it with ConnectionTermination. With no retry policy, the router sends the local reply 503 "upstream connect error or disconnect/reset before headers. reset reason: connection termination"`,
|
|
12955
12972
|
rung: "implemented"
|
|
12956
12973
|
},
|
|
12957
12974
|
{
|
|
12958
|
-
ref: `${AT$
|
|
12975
|
+
ref: `${AT$6} source/common/router/retry_state_impl.cc:28-47 a route with no retry_on, and a request with no x-envoy-retry-on, get no retry state`,
|
|
12959
12976
|
rung: "implemented"
|
|
12960
12977
|
},
|
|
12961
12978
|
{
|
|
12962
|
-
ref: `${AT$
|
|
12979
|
+
ref: `${AT$6} source/common/upstream/upstream_impl.cc:1206-1207 the connect timeout of a cluster: 5 s. Its end gives the local reply 503 with the reset reason connection timeout`,
|
|
12963
12980
|
rung: "implemented"
|
|
12964
12981
|
},
|
|
12965
12982
|
{
|
|
12966
|
-
ref: `${AT$
|
|
12983
|
+
ref: `${AT$6} source/extensions/filters/network/http_connection_manager/config.h:372-377 and config.cc:404-425, :488-492 the defaults of the HTTP connection manager: stream_idle_timeout 5 min, request_timeout off, drain_timeout 5 s, delayed_close_timeout 1 s, idle_timeout 1 h`,
|
|
12967
12984
|
rung: "implemented"
|
|
12968
12985
|
},
|
|
12969
12986
|
{
|
|
12970
|
-
ref: `${AT$
|
|
12987
|
+
ref: `${AT$6} cm.cc:968-974, :1052-1069 the idle timer of a stream: each frame of the stream arms it again. Its end gives the local reply 504 "stream timeout" for a request that is complete`,
|
|
12971
12988
|
rung: "implemented"
|
|
12972
12989
|
},
|
|
12973
12990
|
{
|
|
12974
|
-
ref: `${AT$
|
|
12991
|
+
ref: `${AT$6} cm.cc:207-212, :1699-1705, :819-824 and h2.cc:1176-1193 the idle timer of a connection runs only with no stream open. Its end sends GOAWAY NO_ERROR as a notice, then after drain_timeout the final GOAWAY and the close`,
|
|
12975
12992
|
rung: "implemented"
|
|
12976
12993
|
},
|
|
12977
12994
|
{
|
|
12978
|
-
ref: `${AT$
|
|
12995
|
+
ref: `${AT$6} api/envoy/config/core/v3/protocol.proto:538-569 and h2.cc:1013-1029 no PING of HTTP/2 from Envoy when connection_keepalive is not given`,
|
|
12979
12996
|
rung: "implemented"
|
|
12980
12997
|
},
|
|
12981
12998
|
{
|
|
12982
|
-
ref: `${AT$
|
|
12999
|
+
ref: `${AT$6} source/common/listener_manager/listener_impl.cc:405-416 and upstream_impl.cc:223-228 no SO_KEEPALIVE on a socket when tcp_keepalive is not given. No TCP_USER_TIMEOUT anywhere`,
|
|
12983
13000
|
rung: "implemented"
|
|
12984
13001
|
},
|
|
12985
13002
|
{
|
|
12986
|
-
ref: `${AT$
|
|
13003
|
+
ref: `${AT$6} source/server/server.cc:1005-1014, :1097-1127 and source/common/listener_manager/active_tcp_listener.cc:54-63 SIGTERM shuts down the server: each worker closes each connection with NoFlush. No GOAWAY and no timer of the drain`,
|
|
12987
13004
|
rung: "implemented"
|
|
12988
13005
|
}
|
|
12989
13006
|
],
|
|
@@ -13343,6 +13360,340 @@ const ENVOY_HTTP2 = machineSchema.parse({
|
|
|
13343
13360
|
}
|
|
13344
13361
|
});
|
|
13345
13362
|
//#endregion
|
|
13363
|
+
//#region src/proxy/haproxy.ts
|
|
13364
|
+
const AT$5 = "haproxy-3.2 v3.2.25";
|
|
13365
|
+
const ST = "src/stream.c";
|
|
13366
|
+
const SC = "src/stconn.c";
|
|
13367
|
+
/**
|
|
13368
|
+
* This document is one connection of HAProxy 3.2.25 in TCP mode, with the configuration of T02:
|
|
13369
|
+
* `mode tcp`, `timeout client`, `timeout server`, `option clitcpka` and `option srvtcpka`. It sets
|
|
13370
|
+
* no `timeout tunnel`, `timeout client-fin`, `timeout server-fin` or `option independent-streams`.
|
|
13371
|
+
*
|
|
13372
|
+
* - Each side has one inactivity timer: `timeout client` toward the client, and `timeout server`
|
|
13373
|
+
* toward the server. It counts from the last read of bytes from that side, or the last send of
|
|
13374
|
+
* bytes to that side.
|
|
13375
|
+
* - Thus each byte that goes through resets the two timers. Its read resets the timer of its
|
|
13376
|
+
* source, and its send resets the timer of its destination. A WebSocket ping and its pong reset both.
|
|
13377
|
+
* - A TCP keepalive probe carries no byte. It resets no timer.
|
|
13378
|
+
* - `timeout server` sends a FIN to the client at once. `timeout client` sends a FIN to the server
|
|
13379
|
+
* first. The client gets its FIN when the server closes its side.
|
|
13380
|
+
* - The clock of HAProxy is in whole ms, read at each wake of its loop. Thus a timer can fire one ms
|
|
13381
|
+
* and one step of the loop early or late.
|
|
13382
|
+
*/
|
|
13383
|
+
const HAPROXY_TCP = machineSchema.parse({
|
|
13384
|
+
format: "mark1russell7.machine/1",
|
|
13385
|
+
id: "haproxy-tcp",
|
|
13386
|
+
title: "HAProxy 3.2.25 in TCP mode: one proxied connection, the inactivity timer of each side, and its close",
|
|
13387
|
+
layer: "proxy",
|
|
13388
|
+
version: "3.2.25",
|
|
13389
|
+
conditions: {
|
|
13390
|
+
haproxy: "v3.2.25 (haproxy:3.2 at the digest of T02)",
|
|
13391
|
+
configuration: "mode tcp, timeout client, timeout server, option clitcpka and option srvtcpka; no timeout tunnel, client-fin or server-fin, and no option independent-streams"
|
|
13392
|
+
},
|
|
13393
|
+
sources: [
|
|
13394
|
+
{
|
|
13395
|
+
ref: `${AT$5} src/proxy.c:557-624 the parse of timeout client, server, tunnel, client-fin and server-fin`,
|
|
13396
|
+
rung: "implemented"
|
|
13397
|
+
},
|
|
13398
|
+
{
|
|
13399
|
+
ref: `${AT$5} ${ST}:527 the timer of the client side is timeout client, and ${ST}:986-987 the timer of the server side is timeout server, from the connect`,
|
|
13400
|
+
rung: "implemented"
|
|
13401
|
+
},
|
|
13402
|
+
{
|
|
13403
|
+
ref: `${AT$5} ${SC}:394-398 the attach of the stream starts the timer of the client, and ${ST}:980 the connect starts the timer of the server`,
|
|
13404
|
+
rung: "implemented"
|
|
13405
|
+
},
|
|
13406
|
+
{
|
|
13407
|
+
ref: `${AT$5} include/haproxy/sc_strm.h:401-406 the read timer of a side expires at its last activity plus its timeout, and :408-413 the send timer runs only while a send is blocked`,
|
|
13408
|
+
rung: "implemented"
|
|
13409
|
+
},
|
|
13410
|
+
{
|
|
13411
|
+
ref: `${AT$5} include/haproxy/stconn.h:194-198 an activity is now_ms, and ${SC}:1538-1544 a read of bytes reports one`,
|
|
13412
|
+
rung: "implemented"
|
|
13413
|
+
},
|
|
13414
|
+
{
|
|
13415
|
+
ref: `${AT$5} include/haproxy/stconn.h:206-223 and ${SC}:1801-1803, :1817 a send of bytes reports one, because no option independent-streams sets SC_FL_INDEP_STR (${ST}:485-489, src/proxy.c:2573-2575)`,
|
|
13416
|
+
rung: "implemented"
|
|
13417
|
+
},
|
|
13418
|
+
{
|
|
13419
|
+
ref: `${AT$5} ${ST}:1594-1630 the expiry of the client side aborts the client side (:1609-1614), and the expiry of the server side aborts the server side (:1621-1626)`,
|
|
13420
|
+
rung: "implemented"
|
|
13421
|
+
},
|
|
13422
|
+
{
|
|
13423
|
+
ref: `${AT$5} ${ST}:2417-2429 an abort of the client side shuts the server side: a FIN to the server`,
|
|
13424
|
+
rung: "implemented"
|
|
13425
|
+
},
|
|
13426
|
+
{
|
|
13427
|
+
ref: `${AT$5} ${ST}:2526-2535 an end or an abort of the server side shuts the client side: a FIN to the client`,
|
|
13428
|
+
rung: "implemented"
|
|
13429
|
+
},
|
|
13430
|
+
{
|
|
13431
|
+
ref: `${AT$5} ${SC}:750-772 an abort does no system call while the side is not shut, and ${SC}:782-837 a shut sends a FIN (:807-809), or closes the socket after an abort (:812)`,
|
|
13432
|
+
rung: "implemented"
|
|
13433
|
+
},
|
|
13434
|
+
{
|
|
13435
|
+
ref: `${AT$5} ${ST}:2497-2506 timeout tunnel replaces the two timers in TCP mode when it is set. T02 does not set it`,
|
|
13436
|
+
rung: "implemented"
|
|
13437
|
+
},
|
|
13438
|
+
{
|
|
13439
|
+
ref: `${AT$5} src/session.c:266-267 and src/proto_tcp.c:405-406 option clitcpka and srvtcpka set SO_KEEPALIVE, with the keepalive sysctls of the namespace`,
|
|
13440
|
+
rung: "implemented"
|
|
13441
|
+
},
|
|
13442
|
+
{
|
|
13443
|
+
ref: `${AT$5} src/ev_epoll.c:244-251 the loop waits in epoll_wait, then reads the clock; src/fd.c:1072-1088 the wait is the time to the next timer plus 1 ms; src/clock.c:256 now_ms is that clock in whole ms`,
|
|
13444
|
+
rung: "implemented"
|
|
13445
|
+
}
|
|
13446
|
+
],
|
|
13447
|
+
states: {
|
|
13448
|
+
"[none]": {
|
|
13449
|
+
initial: true,
|
|
13450
|
+
pseudo: true,
|
|
13451
|
+
note: "Before the accept of the connection of the client"
|
|
13452
|
+
},
|
|
13453
|
+
linked: { note: "The two sides are open, and each copies bytes to the other. The two timers run" },
|
|
13454
|
+
"upstream-shut": { note: "After timeout client: HAProxy sent a FIN to the server, and it waits for the end of the server side" },
|
|
13455
|
+
ended: {
|
|
13456
|
+
final: true,
|
|
13457
|
+
note: "The two sides are closed"
|
|
13458
|
+
}
|
|
13459
|
+
},
|
|
13460
|
+
events: {
|
|
13461
|
+
"local.accept": {
|
|
13462
|
+
kind: "local",
|
|
13463
|
+
note: "The accept of the client, and the attach of its stream"
|
|
13464
|
+
},
|
|
13465
|
+
"local.dialed": {
|
|
13466
|
+
kind: "local",
|
|
13467
|
+
note: "The connect to the server completes"
|
|
13468
|
+
},
|
|
13469
|
+
"rx.client-data": {
|
|
13470
|
+
kind: "rx",
|
|
13471
|
+
note: "A read of bytes from the client"
|
|
13472
|
+
},
|
|
13473
|
+
"tx.client-data": {
|
|
13474
|
+
kind: "tx",
|
|
13475
|
+
note: "A send of bytes to the client"
|
|
13476
|
+
},
|
|
13477
|
+
"rx.upstream-data": {
|
|
13478
|
+
kind: "rx",
|
|
13479
|
+
note: "A read of bytes from the server"
|
|
13480
|
+
},
|
|
13481
|
+
"tx.upstream-data": {
|
|
13482
|
+
kind: "tx",
|
|
13483
|
+
note: "A send of bytes to the server"
|
|
13484
|
+
},
|
|
13485
|
+
"timer.client": {
|
|
13486
|
+
kind: "timer",
|
|
13487
|
+
note: "No activity on the client side for timeout client"
|
|
13488
|
+
},
|
|
13489
|
+
"timer.server": {
|
|
13490
|
+
kind: "timer",
|
|
13491
|
+
note: "No activity on the server side for timeout server"
|
|
13492
|
+
},
|
|
13493
|
+
"peer.client-fin": {
|
|
13494
|
+
kind: "peer",
|
|
13495
|
+
note: "The client ends its side: an end of file for HAProxy"
|
|
13496
|
+
},
|
|
13497
|
+
"peer.upstream-fin": {
|
|
13498
|
+
kind: "peer",
|
|
13499
|
+
note: "The server ends its side: an end of file for HAProxy"
|
|
13500
|
+
},
|
|
13501
|
+
"peer.client-rst": {
|
|
13502
|
+
kind: "peer",
|
|
13503
|
+
note: "A reset of the socket toward the client"
|
|
13504
|
+
},
|
|
13505
|
+
"peer.upstream-rst": {
|
|
13506
|
+
kind: "peer",
|
|
13507
|
+
note: "A reset of the socket toward the server"
|
|
13508
|
+
},
|
|
13509
|
+
"tx.client-fin": {
|
|
13510
|
+
kind: "tx",
|
|
13511
|
+
note: "HAProxy ends its side toward the client: a FIN"
|
|
13512
|
+
},
|
|
13513
|
+
"tx.upstream-fin": {
|
|
13514
|
+
kind: "tx",
|
|
13515
|
+
note: "HAProxy ends its side toward the server: a FIN"
|
|
13516
|
+
}
|
|
13517
|
+
},
|
|
13518
|
+
knobs: {
|
|
13519
|
+
timeout_client: {
|
|
13520
|
+
key: "timeout client",
|
|
13521
|
+
scope: "frontend",
|
|
13522
|
+
unit: "s",
|
|
13523
|
+
default: null,
|
|
13524
|
+
off: 0,
|
|
13525
|
+
note: "No default: with no value, or 0, the client side has no timer. T02 sets it"
|
|
13526
|
+
},
|
|
13527
|
+
timeout_server: {
|
|
13528
|
+
key: "timeout server",
|
|
13529
|
+
scope: "backend",
|
|
13530
|
+
unit: "s",
|
|
13531
|
+
default: null,
|
|
13532
|
+
off: 0,
|
|
13533
|
+
note: "No default: with no value, or 0, the server side has no timer. T02 sets it"
|
|
13534
|
+
},
|
|
13535
|
+
tick: {
|
|
13536
|
+
key: "now_ms, the clock of HAProxy",
|
|
13537
|
+
scope: "process",
|
|
13538
|
+
unit: "s",
|
|
13539
|
+
default: .001,
|
|
13540
|
+
note: "clock.c:256: whole ms. fd.c:1083 adds 1 ms to each wait"
|
|
13541
|
+
},
|
|
13542
|
+
slack: {
|
|
13543
|
+
key: "the time of HAProxy for one step of its loop",
|
|
13544
|
+
scope: "process",
|
|
13545
|
+
unit: "s",
|
|
13546
|
+
default: .01,
|
|
13547
|
+
note: "An assumption of this document, not a value of HAProxy"
|
|
13548
|
+
}
|
|
13549
|
+
},
|
|
13550
|
+
timers: {
|
|
13551
|
+
timeout_client: {
|
|
13552
|
+
duration: {
|
|
13553
|
+
knob: "timeout_client",
|
|
13554
|
+
unit: "s"
|
|
13555
|
+
},
|
|
13556
|
+
lateness: {
|
|
13557
|
+
expr: "tick + slack",
|
|
13558
|
+
unit: "s"
|
|
13559
|
+
},
|
|
13560
|
+
early: {
|
|
13561
|
+
expr: "tick + slack",
|
|
13562
|
+
unit: "s"
|
|
13563
|
+
},
|
|
13564
|
+
arms: [
|
|
13565
|
+
"local.accept",
|
|
13566
|
+
"rx.client-data",
|
|
13567
|
+
"tx.client-data"
|
|
13568
|
+
],
|
|
13569
|
+
fires: "timer.client",
|
|
13570
|
+
note: "From the last read from the client or send to the client. The activity is the clock of the wake, in whole ms: up to one ms and one step before the read or the send"
|
|
13571
|
+
},
|
|
13572
|
+
timeout_server: {
|
|
13573
|
+
duration: {
|
|
13574
|
+
knob: "timeout_server",
|
|
13575
|
+
unit: "s"
|
|
13576
|
+
},
|
|
13577
|
+
lateness: {
|
|
13578
|
+
expr: "tick + slack",
|
|
13579
|
+
unit: "s"
|
|
13580
|
+
},
|
|
13581
|
+
early: {
|
|
13582
|
+
expr: "tick + slack",
|
|
13583
|
+
unit: "s"
|
|
13584
|
+
},
|
|
13585
|
+
arms: [
|
|
13586
|
+
"local.dialed",
|
|
13587
|
+
"rx.upstream-data",
|
|
13588
|
+
"tx.upstream-data"
|
|
13589
|
+
],
|
|
13590
|
+
fires: "timer.server",
|
|
13591
|
+
note: "From the last read from the server or send to the server, with the same clock"
|
|
13592
|
+
}
|
|
13593
|
+
},
|
|
13594
|
+
realizes: { "systems.mechanism.middlebox-idle": {
|
|
13595
|
+
duration: {
|
|
13596
|
+
expr: "min(timeout_client, timeout_server)",
|
|
13597
|
+
unit: "s"
|
|
13598
|
+
},
|
|
13599
|
+
lateness: {
|
|
13600
|
+
expr: "tick + slack",
|
|
13601
|
+
unit: "s"
|
|
13602
|
+
},
|
|
13603
|
+
early: {
|
|
13604
|
+
expr: "tick + slack",
|
|
13605
|
+
unit: "s"
|
|
13606
|
+
},
|
|
13607
|
+
note: "Only bytes reset it. A TCP keepalive probe carries none"
|
|
13608
|
+
} },
|
|
13609
|
+
transitions: [
|
|
13610
|
+
{
|
|
13611
|
+
id: "hp.accept",
|
|
13612
|
+
from: "[none]",
|
|
13613
|
+
to: "linked",
|
|
13614
|
+
on: "local.accept",
|
|
13615
|
+
timer: "timeout_client",
|
|
13616
|
+
source: "stconn.c:394-398, stream.c:527"
|
|
13617
|
+
},
|
|
13618
|
+
{
|
|
13619
|
+
id: "hp.dialed",
|
|
13620
|
+
from: "linked",
|
|
13621
|
+
to: "linked",
|
|
13622
|
+
on: "local.dialed",
|
|
13623
|
+
timer: "timeout_server",
|
|
13624
|
+
source: "stream.c:980, :986-987"
|
|
13625
|
+
},
|
|
13626
|
+
{
|
|
13627
|
+
id: "hp.bytes",
|
|
13628
|
+
from: "linked",
|
|
13629
|
+
to: "linked",
|
|
13630
|
+
on: [
|
|
13631
|
+
"rx.client-data",
|
|
13632
|
+
"tx.upstream-data",
|
|
13633
|
+
"rx.upstream-data",
|
|
13634
|
+
"tx.client-data"
|
|
13635
|
+
],
|
|
13636
|
+
note: "A read resets the timer of its source, and a send resets the timer of its destination",
|
|
13637
|
+
source: "stconn.c:1538-1544, :1801-1803, :1817"
|
|
13638
|
+
},
|
|
13639
|
+
{
|
|
13640
|
+
id: "hp.server-timeout",
|
|
13641
|
+
from: "linked",
|
|
13642
|
+
to: "ended",
|
|
13643
|
+
on: "timer.server",
|
|
13644
|
+
timer: "timeout_server",
|
|
13645
|
+
emits: ["tx.client-fin"],
|
|
13646
|
+
note: "The server side is aborted, and the client side is shut at once: a FIN to the client",
|
|
13647
|
+
source: "stream.c:1621-1626, :2526-2535"
|
|
13648
|
+
},
|
|
13649
|
+
{
|
|
13650
|
+
id: "hp.client-timeout",
|
|
13651
|
+
from: "linked",
|
|
13652
|
+
to: "upstream-shut",
|
|
13653
|
+
on: "timer.client",
|
|
13654
|
+
timer: "timeout_client",
|
|
13655
|
+
emits: ["tx.upstream-fin"],
|
|
13656
|
+
note: "The client side is aborted with no system call, and the server side is shut: a FIN to the server",
|
|
13657
|
+
source: "stream.c:1609-1614, :2417-2429, stconn.c:750-772"
|
|
13658
|
+
},
|
|
13659
|
+
{
|
|
13660
|
+
id: "hp.upstream-end",
|
|
13661
|
+
from: "upstream-shut",
|
|
13662
|
+
to: "ended",
|
|
13663
|
+
on: ["peer.upstream-fin", "peer.upstream-rst"],
|
|
13664
|
+
emits: ["tx.client-fin"],
|
|
13665
|
+
note: "The end of the server side shuts the client side. It closes the socket of the client after its abort",
|
|
13666
|
+
source: "stream.c:2526-2535, stconn.c:812"
|
|
13667
|
+
},
|
|
13668
|
+
{
|
|
13669
|
+
id: "hp.client-end",
|
|
13670
|
+
from: "linked",
|
|
13671
|
+
to: "ended",
|
|
13672
|
+
on: ["peer.client-fin", "peer.client-rst"],
|
|
13673
|
+
emits: ["tx.upstream-fin"],
|
|
13674
|
+
source: "stream.c:2417-2429"
|
|
13675
|
+
},
|
|
13676
|
+
{
|
|
13677
|
+
id: "hp.upstream-close",
|
|
13678
|
+
from: "linked",
|
|
13679
|
+
to: "ended",
|
|
13680
|
+
on: ["peer.upstream-fin", "peer.upstream-rst"],
|
|
13681
|
+
emits: ["tx.client-fin"],
|
|
13682
|
+
source: "stream.c:2526-2535"
|
|
13683
|
+
}
|
|
13684
|
+
],
|
|
13685
|
+
over: {
|
|
13686
|
+
machine: "systems.machine.linux-tcp",
|
|
13687
|
+
states: {
|
|
13688
|
+
linked: "ESTABLISHED",
|
|
13689
|
+
"upstream-shut": "ESTABLISHED"
|
|
13690
|
+
},
|
|
13691
|
+
sets: {},
|
|
13692
|
+
ends: "peer.client-rst",
|
|
13693
|
+
note: "Each socket of HAProxy, toward the client and toward the server: a Linux TCP socket with SO_KEEPALIVE and the keepalive sysctls of its namespace"
|
|
13694
|
+
}
|
|
13695
|
+
});
|
|
13696
|
+
//#endregion
|
|
13346
13697
|
//#region src/proxy/istio.ts
|
|
13347
13698
|
const IS = "istio 1.31.3";
|
|
13348
13699
|
const AT$4 = "envoy v1.39.4";
|
|
@@ -17778,12 +18129,13 @@ const MACHINES = byId([
|
|
|
17778
18129
|
CADDY_HTTP2,
|
|
17779
18130
|
NGINX_GRPC,
|
|
17780
18131
|
TRAEFIK_HTTP2,
|
|
18132
|
+
HAPROXY_TCP,
|
|
17781
18133
|
ISTIO_SIDECAR_OUTBOUND,
|
|
17782
18134
|
ISTIO_SIDECAR_INBOUND,
|
|
17783
18135
|
PILOT_AGENT,
|
|
17784
18136
|
ZTUNNEL_HBONE
|
|
17785
18137
|
]);
|
|
17786
18138
|
//#endregion
|
|
17787
|
-
export { AMQPLIB, ATEN_DETECTOR, CADDY_HTTP2, DOCKER_PROXY_LINK, ENVOY_HTTP2, ETCD_SERVER, GO_TRANSPORT, GRPC_GO_SERVER, GRPC_JS, HIKARICP_PGJDBC, IOREDIS_SENTINEL, IOREDIS_STATUS, ISTIO_SIDECAR_INBOUND, ISTIO_SIDECAR_OUTBOUND, LINUX_TCP, MACHINES, MANIFESTATIONS, MONGODB_NODE, MONGOD_REPL, MONGOD_SESSION, NF_CONNTRACK_TCP, NGINX_GRPC, NODE_HTTP_AGENT, NODE_HTTP_SERVER, NODE_POSTGRES, NODE_TIMER_EARLY, PGBOUNCER_CLIENT, PGBOUNCER_SERVER, PGPOOL_SESSION, PILOT_AGENT, POSTGRES_SESSION, PROCEDURES_WS_CLIENT, PROCEDURES_WS_SERVER, RABBITMQ_CONNECTION, RA_MEMBER, REDIS_CLIENT, SENTINEL, SUPAVISOR_CLIENT, SUPAVISOR_SERVER, TOXIPROXY_LINK, TRAEFIK_HTTP2, UNDICI_CLIENT, UNDICI_RETRY, UNDICI_TICK_MS, ZTUNNEL_HBONE, goLateSeconds, goTimerLateness, istioSidecar, nodeEarlySeconds, nodeLateSeconds, nodeTimerLateness, undiciFastEarly, undiciFastLateness };
|
|
18139
|
+
export { AMQPLIB, ATEN_DETECTOR, CADDY_HTTP2, DOCKER_PROXY_LINK, ENVOY_HTTP2, ETCD_SERVER, GO_TRANSPORT, GRPC_GO_SERVER, GRPC_JS, HAPROXY_TCP, HIKARICP_PGJDBC, IOREDIS_SENTINEL, IOREDIS_STATUS, ISTIO_SIDECAR_INBOUND, ISTIO_SIDECAR_OUTBOUND, LINUX_TCP, MACHINES, MANIFESTATIONS, MONGODB_NODE, MONGOD_REPL, MONGOD_SESSION, NF_CONNTRACK_TCP, NGINX_GRPC, NODE_HTTP_AGENT, NODE_HTTP_SERVER, NODE_POSTGRES, NODE_TIMER_EARLY, PGBOUNCER_CLIENT, PGBOUNCER_SERVER, PGPOOL_SESSION, PILOT_AGENT, POSTGRES_SESSION, PROCEDURES_WS_CLIENT, PROCEDURES_WS_SERVER, RABBITMQ_CONNECTION, RA_MEMBER, REDIS_CLIENT, SENTINEL, SUPAVISOR_CLIENT, SUPAVISOR_SERVER, TOXIPROXY_LINK, TRAEFIK_HTTP2, UNDICI_CLIENT, UNDICI_RETRY, UNDICI_TICK_MS, ZTUNNEL_HBONE, goLateSeconds, goTimerLateness, istioSidecar, nodeEarlySeconds, nodeLateSeconds, nodeTimerLateness, undiciFastEarly, undiciFastLateness };
|
|
17788
18140
|
|
|
17789
18141
|
//# sourceMappingURL=index.js.map
|