-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Storage
-
Storage Execution
-
Execution Team 2020-05-04, Execution Team 2020-05-18, Execution Team 2020-06-01
Today, when we're done running our tests we run the collection validation hook to make sure the data is valid. It would be useful to inject some data to create corruption prior to running the collection validation hook to have more coverage for our validate command in terms of it properly finding the corruption and to catch/fix any unexpected behavior in the command. Additionally test mongod --repair to ensure repair can correctly recover.
We can use the wt tool to dump / modify / reload tables and thus simulate corruption that may occur due to in memory data corruption events or logical corruption after WiredTiger has attempted to salvage data:
- Remove rows from index tables to create missing index entries
- Duplicate rows in index tables to create duplicate index entries
- Remove rows from record store tables to create extra index entries
- Duplicate rows in record store tables to create duplicate _id key violations on repair
- Change rows in index tables to simulate index corruption.
- Change rows in record store tables to simulate collection data corruption.
Note: we should ensure we perform enough corruptionĀ to make it improbable that validation succeeds due to hash bucket collisions.