Skip to content

commitlog: Fix trim logic in stream writer#5488

Merged
kim merged 1 commit into
masterfrom
kim/commitlog/fix-stream-writer-trim-trailing
Jul 7, 2026
Merged

commitlog: Fix trim logic in stream writer#5488
kim merged 1 commit into
masterfrom
kim/commitlog/fix-stream-writer-trim-trailing

Conversation

@kim

@kim kim commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

StreamWriter::create_and_metadata truncates the segment if given OnTrailingData::Trim and there is a bad commit in the existing segment.

It did, however, only do that when there exists an offset index, and otherwise return the last-good metadata without actually modifying the file.

StreamWriter::create_and_metadata truncates the segment if given
OnTrailingData::Trim and there is a bad commit in the existing segment.

It did, however, only do that when there exists an offset index, and
otherwise return the last-good metadata without actually modifying the
file.
@kim kim requested a review from Shubham8287 July 6, 2026 16:07
@kim kim added this pull request to the merge queue Jul 7, 2026
Merged via the queue into master with commit 903ed9c Jul 7, 2026
51 of 52 checks passed
@kim kim deleted the kim/commitlog/fix-stream-writer-trim-trailing branch July 7, 2026 07:37
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.

2 participants