Skip to content

Conversation

coszio
Copy link
Contributor

@coszio coszio commented Aug 4, 2025

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 timvisee and generall August 4, 2025 17:03

This comment was marked as resolved.

@timvisee
Copy link
Member

timvisee commented Aug 5, 2025

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
16 checks passed
@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