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

metamorphic: use single delete instead of delete opportunistically #3108

Open
Tracked by #2825
jbowens opened this issue Nov 27, 2023 · 2 comments
Open
Tracked by #2825

metamorphic: use single delete instead of delete opportunistically #3108

jbowens opened this issue Nov 27, 2023 · 2 comments
Assignees
Projects

Comments

@jbowens
Copy link
Collaborator

jbowens commented Nov 27, 2023

Now that we have CanDeterministicallySingleDelete, we could at runtime decide to single delete instead of delete when performing a delete against a DB or an indexed batch. We'd need to create an iterator, seek to the key, and call CanDeterministicallySingleDelete.

Related to #3107.

@jbowens jbowens added this to Incoming in Storage via automation Nov 27, 2023
@jbowens jbowens mentioned this issue Nov 27, 2023
18 tasks
@jbowens jbowens self-assigned this Nov 27, 2023
@jbowens jbowens moved this from Incoming to In Progress (this milestone) in Storage Nov 27, 2023
@jbowens
Copy link
Collaborator Author

jbowens commented Nov 28, 2023

In implementing this, I discovered that CanDeterministicallySingleDelete is flawed with obsolete bit masking. The obsolete bit masking may hide a DEL within a table that's made obsolete by higher-seqnum'd SET within the same table. If there's another SET within a lower level, the top-level Iterator will observe SET, SET and conclude that it's unsafe to single delete when it is indeed safe.

@jbowens jbowens closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
Storage automation moved this from In Progress (this milestone) to Done Nov 28, 2023
@jbowens jbowens reopened this Nov 28, 2023
Storage automation moved this from Done to Incoming Nov 28, 2023
@jbowens
Copy link
Collaborator Author

jbowens commented Nov 28, 2023

The above doesn't preclude using it within the metamorphic tests if we have an option to disable obsolete-bit masking on a per-Iterator level.

There's still a complication around MERGE keys. The current key may be the result of combining multiple merges, in which case SINGLEDEL is not deterministic. CanDeterministicallySingleDelete will need a way to observe whether the current iterator position is the result of merging.

@nicktrav nicktrav moved this from Incoming to In Progress (this milestone) in Storage Nov 28, 2023
@jbowens jbowens moved this from In Progress (this milestone) to Next in Storage Dec 11, 2023
@jbowens jbowens moved this from Next to Backlog in Storage Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Storage
  
Backlog
Development

Successfully merging a pull request may close this issue.

1 participant