Repository navigation
flush: bound unflushed data age to 30 s - #131
Merged
Merged
Conversation
… dirty Below the 1024-block threshold nothing uploaded a running export, so a hard node death lost every write since the last threshold flush, with no time bound. The write path now signals the scheduler on each clean-to-dirty edge; the scheduler arms a one-shot 30 s timer and, when it fires with dirty blocks, runs the ordinary flush branch (same atomic cut, backoff, semaphore). Clean, deleted and manual-mode exports upload nothing. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpMBiw38GkJFe49jfZowsH
Contributor
Author
|
Added up to 5 s of early-only jitter to the dirty-age deadline (25-30 s). Cut lock hold, 64 exports: simultaneous p50 2.4-4.0 ms / p95 16-20 ms / max 43-73 ms; spread p50 0.38 ms / p95 2.8-4.4 ms. One export alone: p50 0.3-0.46 ms, max 1.0 ms. The earlier 3-10 ms write latency during a flush is promote-copy and CPU contention, not the lock. 🤖 Generated with Claude Code |
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.
Bounds how long written data can stay out of S3. Before: only the 1024-block threshold (or sleep/detach) uploaded a running export, and the 5 s timer was never armed by writes. A hard node death lost every write since the last upload.
Now: the write path signals the scheduler on each clean-to-dirty edge (once per edge), the scheduler arms a one-shot 30 s timer, and on fire with dirty blocks it takes the existing flush branch (same atomic cut, flush lock, semaphore, backoff, compaction). Clean, deleted (shutdown or purge abort) and manual-mode exports upload nothing.
Tests (fail without the change): sub-threshold write uploads within the bound; export deleted before the bound uploads nothing; manual mode no timer; S3 failure at the bound goes through backoff.
Measured against MinIO, 4 KiB random writes, n=225 and 1674 writes overlapping flushes: write p50 29 us -> 219 us, p95 88 us -> 3 ms during a flush on the 32-block hot set; max pause about 10 ms (rotation cut). 2 PUTs per flush without compaction.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WpMBiw38GkJFe49jfZowsH