Enum WalRecoveryMode
- Namespace
- RocksDbNet
- Assembly
- RocksDb.Net.dll
WAL recovery mode.
public enum WalRecoveryMode
Fields
AbsoluteConsistency = 1Expects a clean shutdown and treats any corruption at all, including an incomplete tail record, as a failure to open.
The strictest mode. Good for tests and for applications that would rather fail loudly than start with less data than they wrote.
PointInTime = 2Replays the log until the first inconsistency and stops there, discarding everything after it. RocksDb's default.
The recovered state is a real point in time, so it is consistent, but writes after the damage are silently lost. Suited to storage that can lose a tail of writes, such as a disk with a volatile write cache.
SkipAnyCorruptedRecords = 3Ignores corruption wherever it appears and salvages whatever records can still be read.
A last resort. The result is not a point in time: records from after a corrupt stretch can be applied while earlier ones are lost, so the database can come back in a state no writer ever produced. Use it to rescue data, not to run on.
TolerateCorruptedTailRecords = 0Tolerates an incomplete final record in any log, which is what a crash mid-write leaves behind, and refuses to open if corruption is found anywhere else.
Choose this when an applied update must never be rolled back, even by a crash. The difference from PointInTime is what happens on real corruption: this refuses to open, rather than recovering up to the damage and discarding the rest.