diff options
author | jannaerin <golden.janna@gmail.com> | 2018-09-24 13:44:21 -0400 |
---|---|---|
committer | jannaerin <golden.janna@gmail.com> | 2018-09-26 10:42:22 -0400 |
commit | 9732cc2ec75ead567015db7e892091ac3ce2e35d (patch) | |
tree | 644dbcd29603c85f6b1a77ebfbc02a3952f093a7 | |
parent | 071521f35b79c8e3c280cfade3b621d61243f3bc (diff) | |
download | mongo-9732cc2ec75ead567015db7e892091ac3ce2e35d.tar.gz |
SERVER-36959 Use afterOpTime when counting chunks in _shardsvrShardCollection
-rw-r--r-- | src/mongo/db/s/shardsvr_shard_collection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/s/shardsvr_shard_collection.cpp b/src/mongo/db/s/shardsvr_shard_collection.cpp index 83a9623a35c..2b09fb4cb59 100644 --- a/src/mongo/db/s/shardsvr_shard_collection.cpp +++ b/src/mongo/db/s/shardsvr_shard_collection.cpp @@ -369,7 +369,8 @@ void checkForExistingChunks(OperationContext* opCtx, const NamespaceString& nss) // Use readConcern local to guarantee we see any chunks that have been written and may // become committed; readConcern majority will not see the chunks if they have not made it // to the majority snapshot. - repl::ReadConcernArgs readConcern(repl::ReadConcernLevel::kLocalReadConcern); + repl::ReadConcernArgs readConcern(Grid::get(opCtx)->configOpTime(), + repl::ReadConcernLevel::kMajorityReadConcern); readConcern.appendInfo(&countBuilder); auto cmdResponse = uassertStatusOK( |