Skip to content

Cleanup versions on segment repair - #6975

Merged
timvisee merged 1 commit into
devfrom
cleanup-versions-on-segment-repair
Aug 5, 2025
Merged

timvisee merged 1 commit into
devfrom
cleanup-versions-on-segment-repair

Conversation

@coszio

@coszio coszio commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

We currently cleanup version after replaying WAL, but we should be cleaning them up BEFORE we reapply operations.

There is currently a problem where WAL replay would assign version=Some(0) to points which had version=None. If we cleanup versions before the replay, we don't need to worry about this

@coszio
coszio requested review from generall and timvisee August 4, 2025 17:03
@coderabbitai

This comment was marked as resolved.

@timvisee

timvisee commented Aug 5, 2025

Copy link
Copy Markdown
Member

I think we originally had this behavior to still use partially persisted points when replaying the WAL. It was previously possible to CoW a point to an appendable segment, while only flushing the the deletion from the original segment. We've revisited the segment flush order since, always flushing appendable segments first now. I agree that this change seems sound now, and cannot think of a problematic situation.

@timvisee timvisee added the next patch Include this in the next patch release label Aug 5, 2025
@timvisee timvisee mentioned this pull request Aug 5, 2025
@timvisee
timvisee merged commit 4d92a33 into dev Aug 5, 2025
@timvisee
timvisee deleted the cleanup-versions-on-segment-repair branch August 5, 2025 12:38
timvisee pushed a commit that referenced this pull request Aug 11, 2025
@timvisee timvisee mentioned this pull request Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

next patch Include this in the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants