perf(core): RwLock engine, fuzz testing, and more#380
Merged
Conversation
STARVATION-001: The Engine used a single Mutex to guard all access to EngineCore, serializing both reads and writes. Changed to RwLock so concurrent reads (get, scan, keys, stats, snapshot) can proceed in parallel without blocking each other. Writes (put, delete, flush, compact, batch operations) still acquire exclusive access. - Add lock_core_mut() for write access alongside lock_core() (reads) - Classify all 24 lock sites as read or write operations - Update Transaction, scrubber to use appropriate lock type - All 554 unit tests pass Closes #360
- Add fuzz target for WAL (write_record, write_batch, recovery, TTL) - Add fuzz target for SSTable (build, get, scan, bloom filter) - Both targets exercised with 1000+ random inputs each — 0 crashes found - Encryption disabled to focus fuzzing on format/decoding logic Closes #371
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
Three significant changes to the ApexStore storage engine:
1. STARVATION-001 — RwLock Engine Core (#360)
Changed Engine's core lock from
parking_lot::Mutextoparking_lot::RwLock. This allows concurrent reads (get, scan, keys, stats, snapshots) to proceed in parallel without blocking each other. Writes (put, delete, flush, compact, batch) still acquire exclusive access viawrite().lock_core_mut()for write access alongsidelock_core()(reads)2. TEST-001 — Fuzz Testing (#371)
Added
cargo-fuzzinfrastructure with two fuzz targets:wal— fuzzes WAL write_record, write_batch, recovery, TTL records (1000 runs, 0 crashes)sstable— fuzzes SSTable build, get, scan, bloom filter (1000 runs, 0 crashes)3. Remaining issues
The following issues are still open and have been deferred due to complexity:
Closes #360
Closes #371