Repository navigation
In proxy segment, apply proxied point delete with its operation version - #5573
Merged
Merged
Conversation
timvisee
marked this pull request as draft
December 3, 2024 11:04
timvisee
force-pushed
the
proxy-segment-point-delete-version
branch
from
December 3, 2024 11:27
094d9ae to
98b2a74
Compare
timvisee
commented
Dec 3, 2024
| optimized_segment.delete_point(version, point_id).unwrap(); | ||
| } | ||
|
|
||
| for deleted_field_name in proxy_deleted_indexes.read().iter() { |
Member
Author
There was a problem hiding this comment.
We also apply payload index changes here with the same segment version. We should apply the same change to those, using newer operation versions.
I'll do that in a separate PR as it'll require more significant changes, and it is not important for our current chaos testing efforts.
It'll already be fine with this change if there are any deletes.
timvisee
marked this pull request as ready for review
December 3, 2024 11:31
generall
approved these changes
Dec 3, 2024
ffuugoo
approved these changes
Dec 3, 2024
ffuugoo
approved these changes
Dec 3, 2024
timvisee
force-pushed
the
proxy-segment-point-delete-version
branch
from
December 3, 2024 12:57
1e5b0e0 to
72ee618
Compare
timvisee
force-pushed
the
proxy-segment-point-delete-version
branch
from
December 3, 2024 14:20
72ee618 to
b6c7017
Compare
timvisee
commented
Dec 3, 2024
Comment on lines
+483
to
+486
| ProxyDeletedPoint { | ||
| local_version: op_num, | ||
| operation_version: op_num, | ||
| }, |
Member
Author
There was a problem hiding this comment.
For explicit delete operations I use op_num for both versions. It prevents moving the point into the write segment through another proxy, if it has a point version in between this local one and this operation.
generall
approved these changes
Dec 3, 2024
9 tasks done
timvisee
added a commit
that referenced
this pull request
Dec 9, 2024
…on (#5573) * In proxy segment, apply proxied point delete with its operation version * Also use correct delete version when propagating changes back to wrapped * Also delete points with version in segment optimizer build new segment * Track original/operation point versions separately on proxied deletes * Fix test compilation failures * Use explicit types when initializing default
3 tasks done
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.
At the end of segment optimization, we apply all proxied point deletes to the optimized segment.
When applying these deletes we reused the current segment version on those operations before. The segment likely considers that version to already be persisted. Subsequent flushes will not write the deletes to disk because of it, the segment thinks there are no new changes.
I've changed this to apply the deletes with the operation version that caused the delete to happen. Those will bump the segment version and ensure proper flushing.
I've added a debug assertion to ensure the delete versions are always newer than the segment version.
All Submissions:
devbranch. Did you create your branch fromdev?New Feature Submissions:
cargo +nightly fmt --allcommand prior to submission?cargo clippy --all --all-featurescommand?