feat(server-ng): add cluster.heartbeat_timeout for VSR liveness window - #3738
Merged
Conversation
numinnex
previously approved these changes
Jul 23, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3738 +/- ##
=============================================
- Coverage 74.63% 60.40% -14.23%
Complexity 950 950
=============================================
Files 1303 1303
Lines 149183 137150 -12033
Branches 124694 112735 -11959
=============================================
- Hits 111338 82845 -28493
- Misses 34348 50720 +16372
- Partials 3497 3585 +88
🚀 New features to boost your workflow:
|
mmodzelewski
previously approved these changes
Jul 23, 2026
The backup-side primary-liveness window was hardcoded at 5s (NORMAL_HEARTBEAT_TICKS). On oversubscribed hosts scheduling stalls exceed it, so backups elect a new primary although the old one is healthy, and client sessions die with the view change - loaded parallel integration runs failed 23 message_retrieval tests this way. Surface the window as [cluster] heartbeat_timeout on the server-ng config. ClusterConfig is forked into server_ng_config (like the tcp/quic/websocket forks) because the legacy struct sources its defaults from the legacy config.toml, which is frozen for ng-only knobs. The runtime converts the duration to consensus ticks and installs it before init, a validator enforces a 2s floor (the zero sentinels are rejected too), and a unit test pins the TOML default to the consensus built-in. The retrieval scenarios now run with a 60s window so box load cannot fake primary death.
hubcio
force-pushed
the
feat/surface-heartbeat-timeout
branch
from
July 23, 2026 13:16
73e9f9b to
7d511ee
Compare
mmodzelewski
approved these changes
Jul 23, 2026
spetz
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The backup-side primary-liveness window was hardcoded at 5s
(NORMAL_HEARTBEAT_TICKS). On oversubscribed hosts scheduling stalls
exceed it, so backups elect a new primary although the old one is
healthy, and client sessions die with the view change - loaded
parallel integration runs failed 23 message_retrieval tests this
way.
Surface the window as [cluster] heartbeat_timeout on the server-ng
config. ClusterConfig is forked into server_ng_config (like the
tcp/quic/websocket forks) because the legacy struct sources its
defaults from the legacy config.toml, which is frozen for ng-only
knobs. The runtime converts the duration to consensus ticks and
installs it before init, a validator enforces a 2s floor (the zero
sentinels are rejected too), and a unit test pins the TOML default
to the consensus built-in. The retrieval scenarios now run with a
60s window so box load cannot fake primary death.