fix(lib): netio TCP connections run with TCP_NODELAY (bug-1890)

With Nagle on, the small TLS record that ends a burst -- a packet header,
the last short chunk of an HA snapshot, a reply -- waited for the peer's
delayed ACK, ~40 ms on Linux: seen on 5 of 40 snapshot transfers. Set
TCP_NODELAY on every netio TCP socket, outbound (socket_create) and
accepted (socket_accept).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-09-29 14:38:57 +00:00
parent 3061df1401
commit 8b561547dd
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
4 changed files with 119 additions and 0 deletions

View file

@ -221,6 +221,7 @@ libxce_test_src = ['testsuite/test.c',
'testsuite/test_netio_bounded_connect.c',
'testsuite/test_netio_batch_dispatch_uaf.c',
'testsuite/test_netio_err_queue.c',
'testsuite/test_netio_nodelay.c',
'testsuite/test_request_send_propagation.c',
'testsuite/test_raft.c',
'testsuite/test_wal_wire.c',