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

CollectionCloner should handle QueryPlanKilled on collection drop

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.4.19, 3.6.10, 4.0.6
    • Fix Version/s: 4.0.7, 3.6.12
    • Component/s: Querying, Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0, v3.6, v3.4
    • Sprint:
      Query 2019-02-25, Query 2019-03-11

      Description

      The CollectionCloner, used in the first phase of initial sync, has code to interpret error codes from the getMore command as indicative of a collection drop:

      https://github.com/mongodb/mongo/blob/bf58b1ab2abfb2a3ab7a86c154f9f5954ed6f98c/src/mongo/db/repl/collection_cloner.cpp#L576-L582

      In 4.0 and older branches, it handles OperationFailed and CursorNotFound. However, collection drops can result in a getMore returning QueryPlanKilled. This error code should be handled as well. This was fixed in 4.1.7 by SERVER-37451, but it still needs to be fixed in older branches. As part of moving ClientCursor ownership to the global cursor manager, SERVER-37451 changed the server's behavior such that collection drops result in QueryPlanKilled rather than CursorNotFound. This necessitated an immediate fix in master in order to ensure that initial sync remains resilient to collection drops. This ticket tracks the remaining backport work.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: