diff options
author | Misha Tyulenev <misha@mongodb.com> | 2016-08-24 18:05:09 -0400 |
---|---|---|
committer | Misha Tyulenev <misha@mongodb.com> | 2016-08-25 11:57:21 -0400 |
commit | 46b33e042de75d801e5fd9f20b74a1c9a249b0c2 (patch) | |
tree | b339c718ee0282cfd04190725369a3b9f154d111 /src/mongo/s/commands/cluster_fsync_cmd.cpp | |
parent | e589562b858061cf82dd430115c82033203db018 (diff) | |
download | mongo-46b33e042de75d801e5fd9f20b74a1c9a249b0c2.tar.gz |
SERVER-23996 ShardRegistry::getShard should return a StatusWith<shared_ptr<Shard>>
Diffstat (limited to 'src/mongo/s/commands/cluster_fsync_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_fsync_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/s/commands/cluster_fsync_cmd.cpp b/src/mongo/s/commands/cluster_fsync_cmd.cpp index 8a1ce646c2e..15e20e2c436 100644 --- a/src/mongo/s/commands/cluster_fsync_cmd.cpp +++ b/src/mongo/s/commands/cluster_fsync_cmd.cpp @@ -87,10 +87,11 @@ public: grid.shardRegistry()->getAllShardIds(&shardIds); for (const ShardId& shardId : shardIds) { - const auto s = grid.shardRegistry()->getShard(txn, shardId); - if (!s) { + auto shardStatus = grid.shardRegistry()->getShard(txn, shardId); + if (!shardStatus.isOK()) { continue; } + const auto s = shardStatus.getValue(); auto response = uassertStatusOK(s->runCommand(txn, |