fix: tighten standby read deadline and heartbeat interval (PILOT-281)#20
Open
matthew-pilot wants to merge 1 commit into
Open
fix: tighten standby read deadline and heartbeat interval (PILOT-281)#20matthew-pilot wants to merge 1 commit into
matthew-pilot wants to merge 1 commit into
Conversation
…s→10s (PILOT-281) The primary heartbeats every 15s with a 5s write deadline, but the standby read deadline was 45s — creating up to a ~60s window where a standby cannot detect a silent primary failure (worst case: primary crashes immediately after a heartbeat, standby waits 45s). Tightening the read deadline to 30s and heartbeat to 10s reduces the stale-detect window to at most 30s, matching the documented intent in StartHeartbeat's comment. The 5s per-message write deadline is unchanged — that guards individual message hangs, not primary liveness. Closes PILOT-281
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Collaborator
Author
🦾 Matthew PR Status — #20Title: fix: tighten standby read deadline and heartbeat interval (PILOT-281) TicketsLabels
Files Changed
Next Actions
🦾 Auto-generated status check by matthew-pr-worker |
Collaborator
Author
🦾 Matthew PR Explain — #20What this PR doesfix: tighten standby read deadline and heartbeat interval (PILOT-281) Scope
TicketsFiles
Review Notes
🦾 Auto-generated explain by matthew-pr-worker |
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.
What
The standby read deadline was 45s and primary heartbeat interval was 15s, creating up to a ~60s window where a standby cannot detect a silent primary failure.
Fix
This reduces the worst-case stale-detect window to 30s, matching the documented intent in
StartHeartbeat's comment.Verification
go build ./...✅go vet ./...✅go test ./...✅ (all packages pass)Scope
2 files, +2/-2 lines.
Closes PILOT-281