-
Type:
Improvement
-
Resolution: Works as Designed
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
On IDHack there is the possibility that recordId was successfully found in the index, but the corresponding document was missing in the collection. Currently, this situation results in a silent return, without triggering an invariant or logging appropriate error information.
This behavior might mask underlying data consistency issues between the index and collection. It seems that there should be an invariant here to ensure database integrity, similar to other cases where critical data cannot be found.
Proposed Solution:
Review the behavior of the IDHack class for cases where:
- A recordId exists in the index but the document is missing in the collection.
Consider implementing:
- An invariant that ensures database integrity and correct relationships between the index and collection.
- Logging or error handling mechanisms to provide better visibility into such inconsistencies.
- is related to
-
SERVER-107213 RecordIds can be reused (initial sync)
-
- In Code Review
-