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

Balancer always fail to move untracked unsplittable collections

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc3
    • Affects Version/s: 8.0.0-alpha2
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0
    • CAR Team 2024-04-29
    • 154

      In suites with random_migrations: true the balancer should randomly execute moveCollection on untracked unsplittable collection.

      Currently, all the attempts executed by the balancer fail, this means that untracked unsplittable collections are never randomly moved.

      This issue is caused by a wrong check that we perform in shardsvr_reshard_collection_command.cpp. In fact, here, we only attempt to register untracked collections if the resharding operations has provenance == kMoveCollection. On the other hand, the resharding commands sent by the balancer use provenance == kBalancerMoveCollection.
      As a result, if the moveCollection operation is coming from the balancer, we will always skip the registration of the unsplittable collection and resharding operation will fail with NamespaceNotFound.

      In order to fix the issue, we should simply use resharding::isMoveCollection(<Provenance>) helper function to assess if the request is a moveCollection.

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: