Repository navigation
Fix apply points mixing point versions, only apply operation to latest - #5528
Merged
timvisee merged 4 commits intoNov 27, 2024
Conversation
timvisee
marked this pull request as ready for review
November 27, 2024 10:04
timvisee
changed the base branch from
dev
to
optimization-cancel-inconsistency
November 27, 2024 10:07
timvisee
deleted the
optimization-cancel-inconsistency-apply-points-latest
branch
November 27, 2024 14:13
generall
added a commit
that referenced
this pull request
Nov 27, 2024
* test to demonstrate inconsistency failure during optimization * Fix apply points mixing point versions, only apply operation to latest (#5528) * Patch apply points, only apply point operations to latest point version * Simplify test, we don't need owned strings in JSON macro * Use ahash in apply points because we map to simple numbers * Minor improvements * preserve the update version before doing move_if_exists in proxy (#5531) * preserve the update version before doing move_if_exists in proxy * Simplify move_if_exists with flat if statements and early return * Fix inverted condition, consider deleted if delete is new * Use hash map keys iterator as more idiomatic Rust --------- Co-authored-by: timvisee <[email protected]> Co-authored-by: Tim Visée <[email protected]> --------- Co-authored-by: Tim Visée <[email protected]> Co-authored-by: timvisee <[email protected]>
coszio
pushed a commit
that referenced
this pull request
Dec 2, 2024
* test to demonstrate inconsistency failure during optimization * Fix apply points mixing point versions, only apply operation to latest (#5528) * Patch apply points, only apply point operations to latest point version * Simplify test, we don't need owned strings in JSON macro * Use ahash in apply points because we map to simple numbers * Minor improvements * preserve the update version before doing move_if_exists in proxy (#5531) * preserve the update version before doing move_if_exists in proxy * Simplify move_if_exists with flat if statements and early return * Fix inverted condition, consider deleted if delete is new * Use hash map keys iterator as more idiomatic Rust --------- Co-authored-by: timvisee <[email protected]> Co-authored-by: Tim Visée <[email protected]> --------- Co-authored-by: Tim Visée <[email protected]> Co-authored-by: timvisee <[email protected]>
timvisee
added a commit
that referenced
this pull request
Dec 9, 2024
* test to demonstrate inconsistency failure during optimization * Fix apply points mixing point versions, only apply operation to latest (#5528) * Patch apply points, only apply point operations to latest point version * Simplify test, we don't need owned strings in JSON macro * Use ahash in apply points because we map to simple numbers * Minor improvements * preserve the update version before doing move_if_exists in proxy (#5531) * preserve the update version before doing move_if_exists in proxy * Simplify move_if_exists with flat if statements and early return * Fix inverted condition, consider deleted if delete is new * Use hash map keys iterator as more idiomatic Rust --------- Co-authored-by: timvisee <[email protected]> Co-authored-by: Tim Visée <[email protected]> --------- Co-authored-by: Tim Visée <[email protected]> Co-authored-by: timvisee <[email protected]>
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.
Potential fix for #5527
Points can be in multiple segments having different versions. We must only apply the operation to the latest version of a point, otherwise our copy on write mechanism may repurpose old point data.
Using the latest point data is very important, because the copy on write operation will bump the version number. If old point data was used, we'll not be able to tell that anymore.
This problem can appear when applying an operation that depends on the current point data (such as set payload), while having a point in multiple segments. Having a point in multiple segments may happen because of optimizations and segment proxies.
All Submissions:
devbranch. Did you create your branch fromdev?New Feature Submissions:
cargo +nightly fmt --allcommand prior to submission?cargo clippy --all --all-featurescommand?