hiero-ledger / hiero-ledger/hiero-consensus-node

Configure dedicated socket options for reconnect connections

Open
#25,895 1 comment 0 reactions 1 assignee Claimed by @imalygin View on GitHub
Platform
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

The reconnect connection shares socket configuration with gossip via `SocketFactory`, which deliberately does not set `SO_SNDBUF`/`SO_RCVBUF` (a comment notes this causes a bug in certain gossip situations). That constraint does not apply to the dedicated, short-lived reconnect socket.

During the reconnect investigation (see #24636), `ss -tmi` on the learner showed the receive buffer pinned at 64 KB (`rb65536`) on the data connections, while the teacher's send buffers autotuned up to ~10 MB (`tb` ≈ 2.5–10 MB). The small, non-autotuning receive buffer on the learner caps the advertised window — in the pathological case the reconnect socket collapsed to `snd_wnd:32` with `rwnd_limited` dominating the transfer.

The change should set reconnect-specific socket options — primarily a larger `SO_RCVBUF` on the learner — without modifying the shared gossip `SocketFactory`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.