Skip to content

fix(buffers): skip corrupted log segments (fixes #18336)#25109

Open
erhudy wants to merge 2 commits intovectordotdev:masterfrom
erhudy:working-on-18336
Open

fix(buffers): skip corrupted log segments (fixes #18336)#25109
erhudy wants to merge 2 commits intovectordotdev:masterfrom
erhudy:working-on-18336

Conversation

@erhudy
Copy link
Copy Markdown

@erhudy erhudy commented Apr 2, 2026

Summary

This PR attempts to fix the issue described in #18336, where Vector will get stuck on corrupted log segments (e.g. if Vector crashed or was oomkilled in the middle of writing a segment).

Vector configuration

Should happen with any Vector configuration that is using disk buffers.

How did you test this PR?

The PR is split into two commits - the first commit adds only a test which can be run with RUST_BACKTRACE=1 cargo test -p vector-buffers reader_hangs_after_partial_write_beyond_last_acked_record. This test will fail when run against the current master branch. The second commit adds a proposed fix, with which the test now passes.

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details on the dd-rust-license-tool.

erhudy added 2 commits April 2, 2026 09:09
This test fails against the contemporary state of master, but
passes when re-run with the next commit.
Fixes vectordotdev#18336 by skipping over corrupted disk buffer segments.
@erhudy erhudy requested a review from a team as a code owner April 2, 2026 13:10
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