[SERVER-18737] Balancer::run can call getValue() on non-OK StatusWith Created: 29/May/15  Updated: 19/Sep/15  Resolved: 29/May/15

Status: Closed
Project: Core Server
Component/s: Internal Code, Sharding
Affects Version/s: None
Fix Version/s: 3.1.4

Type: Bug Priority: Major - P3
Reporter: Adam Midvidy Assignee: Daniel Alabi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-18007 StatusWith should work with non-defau... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

pull this branch: https://github.com/amidvidy/mongo/tree/SERVER-18007-optional and run mongos.

Participants:

 Description   

auto balSettingsResult = grid.catalogManager()->getGlobalSettings(SettingsType::BalancerDocKey);
const bool isBalSettingsAbsent = balSettingsResult.getStatus() == ErrorCodes::NoSuchKey;                
if (!balSettingsResult.isOK() && !isBalSettingsAbsent) {
    warning() << balSettingsResult.getStatus();
    return;
}
const SettingsType& balancerConfig = balSettingsResult.getValue();



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

Author:

{u'username': u'alabid', u'name': u'Daniel Alabi', u'email': u'alabidan@gmail.com'}

Message: SERVER-18737 Balancer::run should not call getValue() on non-OK StatusWith
Branch: master
https://github.com/mongodb/mongo/commit/7ebc898162b960e9801d5cf4fed2303aaff43589

Comment by Adam Midvidy [ 29/May/15 ]

assigning to andy for triage - note that this blocks SERVER-18007.

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