run go1.19 gofmt and make adjustments as needed
(Go 1.19 expanded doc comment syntax)
This commit is contained in:
+20
-24
@@ -6,12 +6,12 @@
|
||||
// In commit 082335df5d85e1b0b9faa35ff182c71886142d3e and earlier, heartbeatconn would fail
|
||||
// this benchmark with a writev I/O timeout (here the ss(8) output at the time of failure)
|
||||
//
|
||||
// ESTAB 33369 0 127.0.0.1:12345 127.0.0.1:57282 users:(("heartbeatconn_i",pid=25953,fd=5))
|
||||
// cubic wscale:7,7 rto:203 rtt:2.992/5.849 ato:162 mss:32768 pmtu:65535 rcvmss:32741 advmss:65483 cwnd:10 bytes_sent:48 bytes_acked:48 bytes_received:195401 segs_out:44 segs_in:57 data_segs_out:6 data_segs_in:34 send 876.1Mbps lastsnd:125 lastrcv:9390 lastack:125 pacing_rate 1752.0Mbps delivery_rate 6393.8Mbps delivered:7 app_limited busy:42ms rcv_rtt:1 rcv_space:65483 rcv_ssthresh:65483 minrtt:0.029
|
||||
// --
|
||||
// ESTAB 0 3956805 127.0.0.1:57282 127.0.0.1:12345 users:(("heartbeatconn_i",pid=26100,fd=3))
|
||||
// cubic wscale:7,7 rto:211 backoff:5 rtt:10.38/16.937 ato:40 mss:32768 pmtu:65535 rcvmss:536 advmss:65483 cwnd:10 bytes_sent:195401 bytes_acked:195402 bytes_received:48 segs_out:57 segs_in:45 data_segs_out:34 data_segs_in:6 send 252.5Mbps lastsnd:9390 lastrcv:125 lastack:125 pacing_rate 505.1Mbps delivery_rate 1971.0Mbps delivered:35 busy:30127ms rwnd_limited:30086ms(99.9%) rcv_space:65495 rcv_ssthresh:65495 notsent:3956805 minrtt:0.007
|
||||
// panic: writev tcp 127.0.0.1:57282->127.0.0.1:12345: i/o timeout
|
||||
// ESTAB 33369 0 127.0.0.1:12345 127.0.0.1:57282 users:(("heartbeatconn_i",pid=25953,fd=5))
|
||||
// cubic wscale:7,7 rto:203 rtt:2.992/5.849 ato:162 mss:32768 pmtu:65535 rcvmss:32741 advmss:65483 cwnd:10 bytes_sent:48 bytes_acked:48 bytes_received:195401 segs_out:44 segs_in:57 data_segs_out:6 data_segs_in:34 send 876.1Mbps lastsnd:125 lastrcv:9390 lastack:125 pacing_rate 1752.0Mbps delivery_rate 6393.8Mbps delivered:7 app_limited busy:42ms rcv_rtt:1 rcv_space:65483 rcv_ssthresh:65483 minrtt:0.029
|
||||
// --
|
||||
// ESTAB 0 3956805 127.0.0.1:57282 127.0.0.1:12345 users:(("heartbeatconn_i",pid=26100,fd=3))
|
||||
// cubic wscale:7,7 rto:211 backoff:5 rtt:10.38/16.937 ato:40 mss:32768 pmtu:65535 rcvmss:536 advmss:65483 cwnd:10 bytes_sent:195401 bytes_acked:195402 bytes_received:48 segs_out:57 segs_in:45 data_segs_out:34 data_segs_in:6 send 252.5Mbps lastsnd:9390 lastrcv:125 lastack:125 pacing_rate 505.1Mbps delivery_rate 1971.0Mbps delivered:35 busy:30127ms rwnd_limited:30086ms(99.9%) rcv_space:65495 rcv_ssthresh:65495 notsent:3956805 minrtt:0.007
|
||||
// panic: writev tcp 127.0.0.1:57282->127.0.0.1:12345: i/o timeout
|
||||
//
|
||||
// The assumed reason for those writev timeouts is the following:
|
||||
// - Sporadic server stalls (sever data handling, usually I/O) cause TCP exponential backoff on the client for client->server
|
||||
@@ -22,27 +22,23 @@
|
||||
// The fix contained in the commit this message was committed with resets the deadline whenever
|
||||
// a heartbeat is received from the server.
|
||||
//
|
||||
//
|
||||
// How to run this integration test:
|
||||
//
|
||||
// Terminal 1:
|
||||
// $ ZREPL_RPC_DATACONN_HEARTBEATCONN_DEBUG=1 go run heartbeatconn_integration_variablereceiverate.go -mode server -addr 127.0.0.1:12345
|
||||
// rpc/dataconn/heartbeatconn: send heartbeat
|
||||
// rpc/dataconn/heartbeatconn: send heartbeat
|
||||
// ...
|
||||
//
|
||||
// Terminal 1:
|
||||
// $ ZREPL_RPC_DATACONN_HEARTBEATCONN_DEBUG=1 go run heartbeatconn_integration_variablereceiverate.go -mode server -addr 127.0.0.1:12345
|
||||
// rpc/dataconn/heartbeatconn: send heartbeat
|
||||
// rpc/dataconn/heartbeatconn: send heartbeat
|
||||
// ...
|
||||
//
|
||||
// Terminal 2:
|
||||
// $ ZREPL_RPC_DATACONN_HEARTBEATCONN_DEBUG=1 go run heartbeatconn_integration_variablereceiverate.go -mode client -addr 127.0.0.1:12345
|
||||
// rpc/dataconn/heartbeatconn: received heartbeat, resetting write timeout
|
||||
// rpc/dataconn/heartbeatconn: renew frameconn write timeout returned errT=<nil> err=%!s(<nil>)
|
||||
// rpc/dataconn/heartbeatconn: send heartbeat
|
||||
// rpc/dataconn/heartbeatconn: received heartbeat, resetting write timeout
|
||||
// rpc/dataconn/heartbeatconn: renew frameconn write timeout returned errT=<nil> err=%!s(<nil>)
|
||||
// rpc/dataconn/heartbeatconn: received heartbeat, resetting write timeout
|
||||
// ...
|
||||
//
|
||||
// You should observe
|
||||
// Terminal 2:
|
||||
// $ ZREPL_RPC_DATACONN_HEARTBEATCONN_DEBUG=1 go run heartbeatconn_integration_variablereceiverate.go -mode client -addr 127.0.0.1:12345
|
||||
// rpc/dataconn/heartbeatconn: received heartbeat, resetting write timeout
|
||||
// rpc/dataconn/heartbeatconn: renew frameconn write timeout returned errT=<nil> err=%!s(<nil>)
|
||||
// rpc/dataconn/heartbeatconn: send heartbeat
|
||||
// rpc/dataconn/heartbeatconn: received heartbeat, resetting write timeout
|
||||
// rpc/dataconn/heartbeatconn: renew frameconn write timeout returned errT=<nil> err=%!s(<nil>)
|
||||
// rpc/dataconn/heartbeatconn: received heartbeat, resetting write timeout
|
||||
// ...
|
||||
package main
|
||||
|
||||
import (
|
||||
|
||||
@@ -2,15 +2,13 @@
|
||||
//
|
||||
// With stdin / stdout on client and server, simulating zfs send|recv piping
|
||||
//
|
||||
// ./microbenchmark -appmode server | pv -r > /dev/null
|
||||
// ./microbenchmark -appmode client -direction recv < /dev/zero
|
||||
//
|
||||
// ./microbenchmark -appmode server | pv -r > /dev/null
|
||||
// ./microbenchmark -appmode client -direction recv < /dev/zero
|
||||
//
|
||||
// Without the overhead of pipes (just protocol performance, mostly useful with perf bc no bw measurement)
|
||||
//
|
||||
// ./microbenchmark -appmode client -direction recv -devnoopWriter -devnoopReader
|
||||
// ./microbenchmark -appmode server -devnoopReader -devnoopWriter
|
||||
//
|
||||
// ./microbenchmark -appmode client -direction recv -devnoopWriter -devnoopReader
|
||||
// ./microbenchmark -appmode server -devnoopReader -devnoopWriter
|
||||
package main
|
||||
|
||||
import (
|
||||
|
||||
+62
-64
@@ -3,7 +3,7 @@
|
||||
// The zrepl documentation refers to the client as the
|
||||
// `active side` and to the server as the `passive side`.
|
||||
//
|
||||
// Design Considerations
|
||||
// # Design Considerations
|
||||
//
|
||||
// zrepl has non-standard requirements to remote procedure calls (RPC):
|
||||
// whereas the coordination of replication (the planning phase) mostly
|
||||
@@ -35,7 +35,7 @@
|
||||
//
|
||||
// Hence, this package attempts to combine the best of both worlds:
|
||||
//
|
||||
// GRPC for Coordination and Dataconn for Bulk Data Transfer
|
||||
// # GRPC for Coordination and Dataconn for Bulk Data Transfer
|
||||
//
|
||||
// This package's Client uses its transport.Connecter to maintain
|
||||
// separate control and data connections to the Server.
|
||||
@@ -47,68 +47,66 @@
|
||||
// The following ASCII diagram gives an overview of how the individual
|
||||
// building blocks are glued together:
|
||||
//
|
||||
// +------------+
|
||||
// | rpc.Client |
|
||||
// +------------+
|
||||
// | |
|
||||
// +--------+ +------------+
|
||||
// | |
|
||||
// +---------v-----------+ +--------v------+
|
||||
// |pdu.ReplicationClient| |dataconn.Client|
|
||||
// +---------------------+ +--------v------+
|
||||
// | label: label: |
|
||||
// | zrepl_control zrepl_data |
|
||||
// +--------+ +------------+
|
||||
// | |
|
||||
// +--v---------v---+
|
||||
// | transportmux |
|
||||
// +-------+--------+
|
||||
// | uses
|
||||
// +-------v--------+
|
||||
// |versionhandshake|
|
||||
// +-------+--------+
|
||||
// | uses
|
||||
// +------v------+
|
||||
// | transport |
|
||||
// +------+------+
|
||||
// |
|
||||
// NETWORK
|
||||
// |
|
||||
// +------+------+
|
||||
// | transport |
|
||||
// +------^------+
|
||||
// | uses
|
||||
// +-------+--------+
|
||||
// |versionhandshake|
|
||||
// +-------^--------+
|
||||
// | uses
|
||||
// +-------+--------+
|
||||
// | transportmux |
|
||||
// +--^--------^----+
|
||||
// | |
|
||||
// +--------+ --------------+ ---
|
||||
// | | |
|
||||
// | label: label: | |
|
||||
// | zrepl_control zrepl_data | |
|
||||
// +-----+----+ +-----------+---+ |
|
||||
// |netadaptor| |dataconn.Server| | rpc.Server
|
||||
// | + | +------+--------+ |
|
||||
// |grpcclient| | |
|
||||
// |identity | | |
|
||||
// +-----+----+ | |
|
||||
// | | |
|
||||
// +---------v-----------+ | |
|
||||
// |pdu.ReplicationServer| | |
|
||||
// +---------+-----------+ | |
|
||||
// | | ---
|
||||
// +----------+ +------------+
|
||||
// | |
|
||||
// +---v--v-----+
|
||||
// | Handler |
|
||||
// +------------+
|
||||
// (usually endpoint.{Sender,Receiver})
|
||||
//
|
||||
//
|
||||
// +------------+
|
||||
// | rpc.Client |
|
||||
// +------------+
|
||||
// | |
|
||||
// +--------+ +------------+
|
||||
// | |
|
||||
// +---------v-----------+ +--------v------+
|
||||
// |pdu.ReplicationClient| |dataconn.Client|
|
||||
// +---------------------+ +--------v------+
|
||||
// | label: label: |
|
||||
// | zrepl_control zrepl_data |
|
||||
// +--------+ +------------+
|
||||
// | |
|
||||
// +--v---------v---+
|
||||
// | transportmux |
|
||||
// +-------+--------+
|
||||
// | uses
|
||||
// +-------v--------+
|
||||
// |versionhandshake|
|
||||
// +-------+--------+
|
||||
// | uses
|
||||
// +------v------+
|
||||
// | transport |
|
||||
// +------+------+
|
||||
// |
|
||||
// NETWORK
|
||||
// |
|
||||
// +------+------+
|
||||
// | transport |
|
||||
// +------^------+
|
||||
// | uses
|
||||
// +-------+--------+
|
||||
// |versionhandshake|
|
||||
// +-------^--------+
|
||||
// | uses
|
||||
// +-------+--------+
|
||||
// | transportmux |
|
||||
// +--^--------^----+
|
||||
// | |
|
||||
// +--------+ --------------+ ---
|
||||
// | | |
|
||||
// | label: label: | |
|
||||
// | zrepl_control zrepl_data | |
|
||||
// +-----+----+ +-----------+---+ |
|
||||
// |netadaptor| |dataconn.Server| | rpc.Server
|
||||
// | + | +------+--------+ |
|
||||
// |grpcclient| | |
|
||||
// |identity | | |
|
||||
// +-----+----+ | |
|
||||
// | | |
|
||||
// +---------v-----------+ | |
|
||||
// |pdu.ReplicationServer| | |
|
||||
// +---------+-----------+ | |
|
||||
// | | ---
|
||||
// +----------+ +------------+
|
||||
// | |
|
||||
// +---v--v-----+
|
||||
// | Handler |
|
||||
// +------------+
|
||||
// (usually endpoint.{Sender,Receiver})
|
||||
package rpc
|
||||
|
||||
// edit trick for the ASCII art above:
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
type Logger = logger.Logger
|
||||
|
||||
/// All fields must be non-nil
|
||||
// All fields must be non-nil
|
||||
type Loggers struct {
|
||||
General Logger
|
||||
Control Logger
|
||||
|
||||
Reference in New Issue
Block a user