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