fix: ensure durable writes actually wait for WAL flush#6368
fix: ensure durable writes actually wait for WAL flush#6368westonpace merged 2 commits intolance-format:mainfrom
Conversation
track_batch_for_wal was returning a pre-resolved watcher instead of the actual BatchDurableWatcher, so durable_write=true never blocked waiting for the WAL flush to complete. Also include close_duration in benchmark timing for accurate end-to-end throughput reporting. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
westonpace
left a comment
There was a problem hiding this comment.
The change seems fine but it raises a question. Why wasn't this caught by a failing unit test? Do we need unit tests to ensure that the durable write feature is actually working as intended?
Verifies that track_batch returns a watcher wired to the real WAL watermark that blocks until flush completes, not a pre-resolved one. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
I just don't think there was a test. I just noticed it because I turned on durable writes and they were completing in like single ms. I just added a unit test that should catch this, but timing things are tough sometimes. |
track_batch_for_wal was returning a pre-resolved watcher instead of the actual BatchDurableWatcher, so durable_write=true never blocked waiting for the WAL flush to complete. Also include close_duration in benchmark timing for accurate end-to-end throughput reporting.