summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/find.cpp
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2019-05-20 17:39:25 -0400
committerCharlie Swanson <charlie.swanson@mongodb.com>2019-06-03 10:30:55 -0400
commit9bcb318c4c9f2c482413a9d85b7e7c99c0492653 (patch)
treed05095e58f4bc309b7ff2191ae4d794fb1a0117f /src/mongo/db/query/find.cpp
parent3542405aa31989401731f50ae76b3cec5ad1db47 (diff)
downloadmongo-9bcb318c4c9f2c482413a9d85b7e7c99c0492653.tar.gz
SERVER-23923 Track writeConcern through getMores
Diffstat (limited to 'src/mongo/db/query/find.cpp')
-rw-r--r--src/mongo/db/query/find.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp
index ce24825218a..7485d1a7260 100644
--- a/src/mongo/db/query/find.cpp
+++ b/src/mongo/db/query/find.cpp
@@ -397,6 +397,13 @@ Message getMore(OperationContext* opCtx,
"OP_GET_MORE operations are not supported on tailable aggregations. Only clients "
"which support the getMore command can be used on tailable aggregations.",
readLock || !cursorPin->isAwaitData());
+ uassert(
+ 31124,
+ str::stream()
+ << "OP_GET_MORE does not support cursors with a write concern other than the default."
+ " Use the getMore command instead. Write concern was: "
+ << cursorPin->getWriteConcernOptions().toBSON(),
+ cursorPin->getWriteConcernOptions().usedDefault);
// If the operation that spawned this cursor had a time limit set, apply leftover time to this
// getmore.
@@ -724,6 +731,7 @@ std::string runQuery(OperationContext* opCtx,
{std::move(exec),
nss,
AuthorizationSession::get(opCtx->getClient())->getAuthenticatedUserNames(),
+ opCtx->getWriteConcern(),
readConcernArgs,
upconvertedQuery,
ClientCursorParams::LockPolicy::kLockExternally,