storage: use merge for intents; enforce singledel invariants #116324
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
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
The text was updated successfully, but these errors were encountered: