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

storage: use merge for intents; enforce singledel invariants #116324

Closed
jbowens opened this issue Dec 13, 2023 · 1 comment
Closed

storage: use merge for intents; enforce singledel invariants #116324

jbowens opened this issue Dec 13, 2023 · 1 comment
Labels
A-storage Relating to our storage engine (Pebble) on-disk storage. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-storage Storage Team

Comments

@jbowens
Copy link
Collaborator

jbowens commented Dec 13, 2023

Intents are currently created using a SET and removed with either DEL or SINGLEDELed depending on a flag within the intent indicating whether the intent has been rewritten. The SINGLEDEL invariants are tricky and some instances of corruption (#114421) could be explained by a violation of these invariants.

Alternatively, we set intents using the MERGE key. This would allow us to detect a subset of violations of the invariants: eg, if two MERGE intents meet and both indicate that the intent has not been rewritten, there must be a bug.

Related to #115881, #114492 and #114421.

Internal slack thread with more details: https://cockroachlabs.slack.com/archives/CAC6K3SLU/p1701960908466419

Jira issue: CRDB-34579

@jbowens jbowens added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-storage Relating to our storage engine (Pebble) on-disk storage. T-storage Storage Team labels Dec 13, 2023
@jbowens jbowens added this to Incoming in (Deprecated) Storage via automation Dec 13, 2023
@jbowens
Copy link
Collaborator Author

jbowens commented Jan 9, 2024

This is not feasible as long as delete-only compactions exist.

@jbowens jbowens closed this as completed Jan 9, 2024
(Deprecated) Storage automation moved this from Incoming to Done Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-storage Relating to our storage engine (Pebble) on-disk storage. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-storage Storage Team
Projects
Archived in project
Development

No branches or pull requests

1 participant