Skip to content

Backport(v1.19): out_forward: use the standby node after a failed ACK or handshake (#5623) - #5638

Merged
Watson1978 merged 1 commit into
v1.19from
backport-to-v1.19/pr5623
Nov 15, 2026
Merged

Watson1978 merged 1 commit into
v1.19from
backport-to-v1.19/pr5623

Conversation

@github-actions

Copy link
Copy Markdown

Which issue(s) this PR fixes:
Backport #5623
Fixes #5620

What this PR does / why we need it:
A failed ACK or a failed handshake disables a node outside the heartbeat, and the heartbeat timer did not rebuild the weight array for a node that was already disabled. So the standby node was never used, and every flush failed with NoNodesAvailable until the primary came back. This remembers the availability of each node when the weight array is built, and the heartbeat timer rebuilds it when the availability has changed.

The same applies to a node disabled at startup by ignore_network_errors_at_startup, so the standby is now used there too. With heartbeat_type udp, a primary that is alive but fails one ACK is replaced by the standby until its next UDP heartbeat response arrives, and using standby node and recovered forwarding server are logged. Before this change, flushes failed with NoNodesAvailable during that time.

Docs Changes:
None.

Release Note:
out_forward: use the standby node after a failed ACK or handshake

When a failed ACK (with require_ack_response) or a failed handshake (with <security>) disabled the primary, the standby node was not used, and every flush failed with NoNodesAvailable until the primary came back.

🤖 Generated with Claude Code

)

**Which issue(s) this PR fixes**:
Fixes #5620

**What this PR does / why we need it**:
A failed ACK or a failed handshake disables a node outside the
heartbeat, and the heartbeat timer did not rebuild the weight array for
a node that was already disabled. So the standby node was never used,
and every flush failed with `NoNodesAvailable` until the primary came
back. This remembers the availability of each node when the weight array
is built, and the heartbeat timer rebuilds it when the availability has
changed.

The same applies to a node disabled at startup by
`ignore_network_errors_at_startup`, so the standby is now used there
too. With `heartbeat_type udp`, a primary that is alive but fails one
ACK is replaced by the standby until its next UDP heartbeat response
arrives, and `using standby node` and `recovered forwarding server` are
logged. Before this change, flushes failed with `NoNodesAvailable`
during that time.

**Docs Changes**:
None.

**Release Note**:
out_forward: use the standby node after a failed ACK or handshake

When a failed ACK (with `require_ack_response`) or a failed handshake
(with `<security>`) disabled the primary, the standby node was not used,
and every flush failed with `NoNodesAvailable` until the primary came
back.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Kentaro Hayashi <kenhys@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@Watson1978 Watson1978 added the bug Something isn't working label Nov 15, 2026
@Watson1978 Watson1978 added this to the v1.19.5 milestone Nov 15, 2026
@Watson1978
Watson1978 merged commit 089f3c7 into v1.19 Nov 15, 2026
21 checks passed
@Watson1978
Watson1978 deleted the backport-to-v1.19/pr5623 branch November 15, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant