fix(recovery): SSTable auto-repair, chaos tests, WAL decoupling, group commit config#381
Merged
Conversation
CRASH-SST-001 (#357): - discover_sstables_from_disk now validates each SSTable on startup - Corrupted/truncated SSTables are moved to quarantine/ subdirectory - Data recovered via WAL replay (runs before SSTable discovery) - Added quarantined_count and recovered_count to stats TEST-003 (#373): - 6 chaos tests for I/O fault tolerance and corruption handling - Tests: deleted SSTable, compact with missing SSTable, restart with missing SSTable, corrupted data blocks, corrupted bloom filter, missing WAL - All tests verify engine survives without panic or crash Closes #357 Closes #373
WRITE-SERIAL-001 (#362): - Writes (put, delete, delete_range) now use a two-phase approach: 1. Brief lock to clone Arc<WriteAheadLog> handle 2. WAL I/O performed OUTSIDE the core lock (write_record is internally synchronized via WAL's own Mutex) 3. Re-acquire lock briefly for memtable insert - This allows concurrent writers to perform WAL I/O in parallel instead of serializing all I/O behind the core lock - Crash-safe: WAL-before-memtable order preserved; crash between WAL write and memtable insert recovers via WAL replay WRITE-WAL-001 (#363): - Added wal_sync_interval to EngineOptions and WalConfig - Wired set_sync_interval() through engine initialization so the WAL fsync interval is configurable via LsmConfig - Default remains 4 (existing behavior) Closes #362 Closes #363
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four complex issues resolved:
CRASH-SST-001 (#357) — SSTable Auto-Repair
TEST-003 (#373) — Chaos Testing
WRITE-SERIAL-001 (#362) — Decoupled WAL I/O
WRITE-WAL-001 (#363) — WAL sync_interval config
MEM-MEMTABLE-002 (#367) — Analysis
Closes #357
Closes #373
Closes #362
Closes #363