Skip to content

fix(tracking): fair track-lock acquisition — compaction no longer starved, legacy writes spill instead of dropping - #145

Merged
brunoazoulay merged 1 commit into
mainfrom
fix/track-lock-fairness
Nov 17, 2026
Merged

brunoazoulay merged 1 commit into
mainfrom
fix/track-lock-fairness

Conversation

@brunoazoulay

Copy link
Copy Markdown
Collaborator

Summary

  • Compaction used a private 400 ms fixed-step wait and lost every race to appenders (CI H3 printed "write skipped").
  • All track-lock takers now share the 1000 ms budget with jittered backoff (src/tracking/track-lock-fair.ts).
  • FUSE_TRACK_JOURNAL=0 and withTrackLockSync callers spill the write (src/tracking/track-legacy-spill.ts) instead of dropping it.

Test plan

  • Full suite locally: 5822 pass / 0 fail, tsc 0
  • test/track-journal-race.test.ts (H3) unchanged, 30/30 pass isolated and under load
  • New: test/track-lock-shared-budget.test.ts, test/track-lock-starvation.test.ts
  • CI green

Report: docs/reports/2026-11-17-track-lock-fairness.md

…rved, legacy writes spill instead of dropping

Compaction used a private 400 ms fixed-step wait and lost every race to
appenders, so CI H3 printed "write skipped". All lock takers now share the
1000 ms budget with jittered backoff. FUSE_TRACK_JOURNAL=0 and
withTrackLockSync callers spill instead of dropping the write.
@brunoazoulay
brunoazoulay merged commit b389aba into main Nov 17, 2026
1 check passed
@brunoazoulay
brunoazoulay deleted the fix/track-lock-fairness branch November 17, 2026 09:06
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