[SERVER-21103] Top chunk optimization is not being triggered when there is no balancer settings document Created: 23/Oct/15  Updated: 25/Jan/17  Resolved: 28/Oct/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.2.0-rc0
Fix Version/s: 3.2.0-rc2

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding B (10/30/15)
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 29/Oct/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-21103 fix comment grammar
Branch: master
https://github.com/mongodb/mongo/commit/cfdc14fdd0134527793a683927fcbac4f1eff59a

Comment by Githook User [ 28/Oct/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-21103 Top chunk optimization is not being triggered when there is no balancer settings document
Branch: master
https://github.com/mongodb/mongo/commit/0ae35ecacb55e7eb8d53eb8ef477163825606080

Generated at Thu Feb 08 03:56:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.