fix(disk buffer): retry reads for published writer progress - #25941
Open
jjh5887 wants to merge 1 commit into
Open
fix(disk buffer): retry reads for published writer progress#25941jjh5887 wants to merge 1 commit into
jjh5887 wants to merge 1 commit into
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
This comment has been minimized.
This comment has been minimized.
jjh5887
force-pushed
the
fix/disk-v2-reader-progress-wait
branch
from
July 23, 2026 22:48
7c222b8 to
83532a1
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
pront
reviewed
Jul 24, 2026
pront
left a comment
Member
There was a problem hiding this comment.
Hi @jjh5887, thank you for this fix!
We recently merged a lot of buffers fixes. I suspect this bug was fixed already. You can test with the latest nightly to confirm. Thanks!
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.
Summary
Fix a rare
disk_v2reader stall by checking published writer progress before waiting for another writer notification.If the reader reaches EOF on the current writer file but the ledger shows that the writer has already published unread records, the reader now briefly backs off and retries the read instead of waiting indefinitely for another notification. Writer-progress waits are also bounded so periodic re-checks remain a fallback safety net.
Vector configuration
N/A. This changes internal
disk_v2buffer reader behavior.The production shape that motivated this is a low-volume source using a disk buffer, where the writer remains open and a single record may arrive after a long idle period.
How did you test this PR?
reader_receives_record_after_cold_start_write, which starts the reader on an empty disk buffer, keeps the writer open, idles briefly, then writes and flushes one record.cargo fmt --package vector-buffers.cargo test -p vector-buffers variants::disk_v2::tests::cold_start::reader_receives_record_after_cold_start_write --no-default-features.cargo test -p vector-buffers --no-default-features -- --test-threads=1.cargo clippy -p vector-buffers --tests --no-default-features -- -D warnings.make check-fmt.make check-markdown.cargo vdev check changelog-fragments --merge-base upstream/master.make check-clippy.Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References