-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Sharding EMEA 2022-09-19
The range deleter observer is currently registering tasks on insert and on update , slightly before the entry oplog entry is actually committed.
This may lead to an improbable but still possible race condition:
- The observer registers the task with "whenToClean=now"
- The range deleter service executor picks the task and executes it right away
- No orphan gets deleted because the range deletion document is not visible yet, the task gets unscheduled
- The range deletion document gets committed
Purpose of this ticket is to delay the registration after the commit actually happens (basically making sure 4 always happens first). This can be done by registering an onCommit event similarly to the way it's done for the critical section.