Skip to content

handoff: disks created after takeover do the threshold flush - #134

Merged
jaredLunde merged 2 commits into
mainfrom
jared/successor-flush-gate-v2
Nov 7, 2026
Merged

jaredLunde merged 2 commits into
mainfrom
jared/successor-flush-gate-v2

Conversation

@jaredLunde

Copy link
Copy Markdown
Contributor

Replaces #132, rebased on main after the #131 revert (no force-push). The handoff successor set GLIDEFS_HANDOFF_SUCCESSOR_PASSIVE and never cleared it, so every cache created after takeover started Warming: flush_packs skipped (no 128 MiB threshold upload) and WAL truncation was skipped, so dirty data and the WAL grew on the node until a drain or snapshot. Drain and snapshot already upload on a successor (flush_until_no_skips has no gate). Tests: tests/successor_flush.rs (pre-takeover cache does not flush; a cache that existed at takeover threshold-flushes after it; a cache created after takeover starts Idle and threshold-flushes at 1,024 blocks); fails without the clear.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WpMBiw38GkJFe49jfZowsH

jaredLunde and others added 2 commits November 7, 2026 07:47
…e flag was never cleared)

run_server_as_successor set GLIDEFS_HANDOFF_SUCCESSOR_PASSIVE for the life of the
process, so every WriteCache built after takeover was born Warming and
flush_packs skipped it forever: no dirty-age, threshold or any scheduler upload,
and no WAL truncation. The flag is now a process-global cleared when takeover
completes; no env var.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WpMBiw38GkJFe49jfZowsH
@jaredLunde
jaredLunde merged commit 0065e7f into main Nov 7, 2026
25 checks passed
@jaredLunde
jaredLunde deleted the jared/successor-flush-gate-v2 branch November 7, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant