Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicas shouldn't update top level rem-set on final field delete #745

Merged
merged 1 commit into from
Nov 20, 2019

Conversation

smukil
Copy link
Contributor

@smukil smukil commented Nov 20, 2019

This applies to hashmaps, sorted sets and sets.

Consider the following example:
If a sorted set in Dynomite has 2 or more items across replicas,
but if one of the replicas has a missed update(s) and therefore has
only 1 item, removing that item using dynomite previously updated
the top level REM set in that replica.

This is incorrect because now trying to read the other (non-deleted)
field, would cause read repairs to compare its timestamp against the
TS in the top level REM set in the inconsistent replica, and delete
the item incorrectly thinking that someone removed the entire map/set/set
in that broken replica.

This patch fixes it by not updating the top level REM set for field
deletes. Only a DEL will update the top level REM set for maps/sets/zsets.

This was noticed in a TEST cluster.

This applies to hashmaps, sorted sets and sets.

Consider the following example:
If a sorted set in Dynomite has 2 or more items across replicas,
but if one of the replicas has a missed update(s) and therefore has
only 1 item, removing that item using dynomite previously updated
the top level REM set in that replica.

This is incorrect because now trying to read the other (non-deleted)
field, would cause read repairs to compare its timestamp against the
TS in the top level REM set in the inconsistent replica, and delete
the item incorrectly thinking that someone removed the entire map/set/set
in that broken replica.

This patch fixes it by not updating the top level REM set for field
deletes. Only a DEL will update the top level REM set for maps/sets/zsets.

This was noticed in a TEST cluster.
@smukil smukil added the bug label Nov 20, 2019
@smukil smukil self-assigned this Nov 20, 2019
@smukil smukil merged commit 5398600 into Netflix:dev Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant