Skip to content

preserve the update version before doing move_if_exists in proxy - #5531

Merged
generall merged 4 commits into
optimization-cancel-inconsistencyfrom
fix-shared-deleted-set-with-versions
Nov 27, 2024
Merged

generall merged 4 commits into
optimization-cancel-inconsistencyfrom
fix-shared-deleted-set-with-versions

Conversation

@generall

@generall generall commented Nov 27, 2024 •

Copy link
Copy Markdown
Member

Additional fix for #5527.

@generall
generall requested a review from timvisee November 27, 2024 14:32
if local_version > deleted_version {
// If local version is higher than what we already moved,
// We might want to overwrite it again
local_version

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the code-path, which we didn't allow before

@timvisee timvisee left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simplified the match tree a bit with two flattened if-statements (6015442). Feel free to drop the commit if you like the previous better - it contains no logic change.

It also looked like two boolean conditions were accidentally reverted, I added a commit to patch this.

Other than that, the implementation looks good. The change makes a lot of sense. Great find!

@generall
generall merged commit fb6d57c into optimization-cancel-inconsistency Nov 27, 2024
@generall
generall deleted the fix-shared-deleted-set-with-versions branch November 27, 2024 15:17
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]>
@timvisee timvisee mentioned this pull request Dec 9, 2024
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