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

Top chunk optimization is not being triggered when there is no balancer settings document

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc2
    • Affects Version/s: 3.2.0-rc0
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding B (10/30/15)

      This appears to be the culprit:

      https://github.com/mongodb/mongo/blob/r3.1.9/src/mongo/s/grid.cpp#L110

          auto balSettingsResult =
              grid.catalogManager(txn)->getGlobalSettings(txn, SettingsType::BalancerDocKey);
          if (!balSettingsResult.isOK()) {
              warning() << balSettingsResult.getStatus();
              return false;
          }
      

      It should not always return false on not OK status. If the status is ErrorCodes::NoMatchingDocument, then it should return true since the absence of the document means that the default behavior should be followed.

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: