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

moveCollection may make a query fail with QueryPlanKilled error

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 8.0.0-rc0
    • Component/s: None
    • Labels:
      None
    • Cluster Scalability
    • 113

      A moveCollection command changes the UUID of the targeted collection. Therefore, any query - using an auto yielding policy - will likely return a QueryPlanKilled error if a moveCollection commit happens during the query execution.

      This error is triggered because we yield and restore the locks from time to time during the query execution leading to a collection check on every restore, which throws a QueryPlanKilled if the collection has been recreated (i.e. its UUID has changed).

      This problem will worsen once we allow the balancer to automatically move collections to distribute the unsharded collections across the cluster evenly. So, we should decide if we accept this error or we do something to avoid it when a query conflicts with a moveCollection.

      You will find a couple of stack traces in the comments of a find and count operations failing with a QueryPlanKilled error.

            Assignee:
            Unassigned Unassigned
            Reporter:
            silvia.surroca@mongodb.com Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: