|
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.
|