Skip to content

fix: tighten standby read deadline and heartbeat interval (PILOT-281)#20

Open
matthew-pilot wants to merge 1 commit into
mainfrom
openclaw/pilot-281-20260530-073910
Open

fix: tighten standby read deadline and heartbeat interval (PILOT-281)#20
matthew-pilot wants to merge 1 commit into
mainfrom
openclaw/pilot-281-20260530-073910

Conversation

@matthew-pilot
Copy link
Copy Markdown
Collaborator

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

  • Standby read deadline: 45s → 30s
  • Primary heartbeat interval: 15s → 10s
  • Per-message write deadline (5s) unchanged — that guards individual message hangs

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

…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
@matthew-pilot matthew-pilot added the matthew-fix Autonomous fix by matthew-pilot (small: ≤3 files / ≤50 LoC) label May 30, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@matthew-pilot
Copy link
Copy Markdown
Collaborator Author

🦾 Matthew PR Status — #20

Title: fix: tighten standby read deadline and heartbeat interval (PILOT-281)
Status: OPEN | Mergeable: MERGEABLE
Author: @matthew-pilot (matthew-pilot bot)
Created: 2026-05-30T07:39:50Z
Branch: openclaw/pilot-281-20260530-073910main
Changes: +2/-2 across 2 files

Tickets

🔗 PILOT-281

Labels

matthew-fix

Files Changed

  • replication.go (+1/-1)
  • replication/replication.go (+1/-1)

Next Actions

  • Explain: /pr explain #20 — detailed analysis
  • Canary retry: /pr retry-canary #20 (if CI failed)
  • Fix & update: /pr fix #20 <instructions>
  • Rebase: /pr rebase #20
  • Close: /pr close #20 <reason>

🦾 Auto-generated status check by matthew-pr-worker

@matthew-pilot
Copy link
Copy Markdown
Collaborator Author

🦾 Matthew PR Explain — #20

What this PR does

fix: tighten standby read deadline and heartbeat interval (PILOT-281)

Scope

  • Files: 2 files
  • Delta: +2/-2 lines
  • Labels: matthew-fix
  • Mergeable: MERGEABLE

Tickets

🔗 PILOT-281

Files

  • replication.go (+1/-1)
  • replication/replication.go (+1/-1)

Review Notes

  • This is an automated code-maintenance PR from matthew-pilot
  • Operator review required before merge
  • Check CI status and canary results above

🦾 Auto-generated explain by matthew-pr-worker

@matthew-pilot
Copy link
Copy Markdown
Collaborator Author

📊 PR Status

  • PR State: OPEN · mergeable ✅ · base: main
  • Created: 2026-05-30T07:39:50Z · Updated: 2026-05-31T09:39:19Z
  • Labels: matthew-fix (small: ≤3 files / ≤50 LoC) · canary-failed
  • Canary: ❌ failed
  • Linked Jira: PILOT-281 [Bug] — TO DO · assigned: Teodor Calin · updated: 2026-05-31T16:40 EEST

    replication: heartbeat 15s + 5s write deadline + 45s standby read deadline widens stale-detect window

  • Reviews: none yet
  • Last non-bot activity: codecov report at 2026-05-30T07:41Z (no operator review activity yet)

🔧 This is a matthew-pilot self-authored PR. Canary failed — operator review needed before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

canary-failed matthew-fix Autonomous fix by matthew-pilot (small: ≤3 files / ≤50 LoC)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant