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

Fix issue with MigrationDestinationManager failing on rangedeletionutil::checkForConflictingDeletions() when it results in running the getMore command

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc14
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • Fully Compatible
    • ALL
    • v8.0
    • Cluster Scalability 2024-07-22
    • 200

      The reason behind the bug is:

      As part of chunk migration MigrationDestinationManager::_migrateDriver() is called. It runs with a logical session checked out and uses retryable writes for replay protection. At the first step it is performing the following: "Ensure any data which might have been left orphaned in the range being moved has been deleted.". This is done by calling rangedeletionutil::checkForConflictingDeletions(), which in itself runs PersistentTaskStore.count(), which is creating a find command and calls itcount() on it, which will call find and then subsequent getMores(), exhausting the cursor and this is where the getMore() is failing with the txnNumber error.

      PersistentTaskStore.count() uses DBDirectClient which is an internal C++ API, which leads to mongod behaving as-if the find and getMore commands received a txnNumber without being part of a multi-statement transaction.

      This was not an issue before changes to DBDirectClient was introduced as part of SERVER-88895.

      Possible solutions could be:

      • Wrap the call to rangedeletionutil::checkForConflictingDeletions() in MigrationDestinationManager inside a runWithoutSession() call
      • SERVER-77332
      • SERVER-91662
      • Revert SERVER-88895?

            Assignee:
            janna.golden@mongodb.com Janna Golden
            Reporter:
            denis.grebennicov@mongodb.com Denis Grebennicov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: