thrawn01
12/18/2024, 12:44 AMcriccomini
12/19/2024, 2:03 AMcriccomini
12/19/2024, 2:04 AMcriccomini
12/19/2024, 3:48 AMthrawn01
12/19/2024, 1:48 PMDBOptions such that when compaction encounters an issue, it calls the callback function provided by the user. From within the CallBack the user could
- Crash the application
- Coordinate with other instances running SlateDB (inform other instances the DB is corrupt, and take appropriate action)
- Auto Repair the corruption
- Ignore the corruption
- Notify someone via pagerduty etc...
More I thought about this, the more I wonder if we could simplify WAL and SST corruption reporting by using this call back for every instance of corruption.
Any operation which encounters corruption will defer control to the provided call back, notifying the developer of the corruption and allow the developer to decide how to handle the corruption. The developer can also signal to via return values wether to continue or abort the operation in question.
The semantics in the face of corruption would be.
- Calls to get invoke the call back function
- Errors found in the WAL during DB open invoke the call back function
- Errors found during compaction invoke the call back function.
This allows corruption to be handled in a central point, and puts the developer in control of how corruption is handled.
Thoughts?thrawn01
12/19/2024, 2:01 PMthrawn01
12/19/2024, 2:10 PMthrawn01
12/19/2024, 2:12 PMcriccomini
12/19/2024, 5:24 PMthrawn01
12/19/2024, 6:29 PMcriccomini
12/19/2024, 7:08 PMcriccomini
12/19/2024, 7:08 PMcriccomini
12/19/2024, 7:08 PMthrawn01
12/20/2024, 12:44 AMthrawn01
12/20/2024, 12:46 AMcriccomini
12/20/2024, 1:45 AMthrawn01
12/21/2024, 5:28 PMDBOptions.on_corruption and just delete the cache file instead?criccomini
12/21/2024, 6:01 PMcriccomini
12/21/2024, 6:02 PMcriccomini
12/21/2024, 6:03 PMcriccomini
12/21/2024, 6:06 PMcriccomini
12/21/2024, 6:06 PMcriccomini
12/21/2024, 6:06 PMthrawn01
12/21/2024, 6:12 PMflaneur233
12/22/2024, 3:12 AM