In SERVER-77513, the de-registration of the range deletion tasks was move from onDelete to an onCommit handler registered by onDelete. This was intended to ensure that the task from the insertion/update happened before that of the deletion of the same document while also ensuring that the changes couldn't be rolled back.
However, this relied on us having ordering guarantees for onCommit handler, meaning that if there was an insert and then a delete of the same document, we were assuming that the onCommit for the insertion had to happen before that of the deletion. However, this is not the case. There are no ordering guarantees for ordering of onCommit handlers from different writers.
This can lead to a case as shown in BF-30367 where a range deletion task is left in memory because the de-registration of the task happened before the insertion of the task.
- is caused by
-
SERVER-77513 Range deletion document removal commit must trigger in-memory state update
- Closed