-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Execution Team 2021-05-17
-
181
Capped collections perform un-timestamped writes to delete expired documents, but all documents will have had an assigned timestamp when first inserted. This breaks contracts with the storage engine regarding mixed-use timestamps and means that point-in-time reads do not work correctly on capped collections.
As a result, background validation and dbHash will fail with the following errors when reading documents that have just been deleted:
- DataCorruptionDetected: Erroneous index key found with reference to non-existent record id
- Index with name X has inconsistencies.
These inconsistencies should be inconsequential because they can only happen when reading documents that have already been deleted.
We already prohibit the use of readConcern: 'snapshot' and multi-document transactions on capped collections for this reason.
- related to
-
SERVER-16049 Replicate capped collection deletes explicitly
- Closed
-
SERVER-52892 Perform capped deletes in the same WUOW as inserts
- Closed
-
SERVER-63339 Investigate enabling more data consistency checks for capped collections
- Closed