Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-83454

Range Deleter Service registration and de-registration should not rely on onCommit ordering guarantees

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.1, 7.3.0-rc0, 7.0.6
    • Affects Version/s: 7.0.0, 7.1.0, 7.3.0-rc0, 7.2.0-rc2
    • Component/s: None
    • Labels:
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v7.2, v7.1, v7.0
    • CAR Team 2023-12-25, CAR Team 2024-01-08, CAR Team 2024-01-22
    • 8
    • 2

      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.

            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            allison.easton@mongodb.com Allison Easton
            0 Vote for this issue
            8 Start watching this issue