Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
None
-
None
-
None
-
ALL
-
Execution Team 2023-03-06, Execution Team 2023-03-20
Description
With the creation of CollectionTruncateMarkers we discovered that there is a correctness bug in the previous OplogStones class with regards to the retention time.
In a given marker right now the wallTime and record id assigned are the ones of the latest record inserted. This presumes that the following constraints hold given records A and B with ids idA, idB, and wall times wallA, wallB:
- idA < idB
- wallA <= wallB
There might be the case though that the following case occurs sometimes in entries:
- idA < idB
- wallA >= wallB
In this case, time-based expiration systems would eagerly delete something before it's supposed expiration time. To fix this we should ideally replace the simple marker creation with something that keeps track of the highest wallTime seen between markers. This would help prevent the correctness issue for time-based expiration systems by guaranteeing that all items present in a marker are older than the given wall time.