diff options
author | Randolph Tan <randolph@10gen.com> | 2022-06-08 18:15:32 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-08 19:11:46 +0000 |
commit | 3a49875934cfd7e70d789b4ad7093286d189acc9 (patch) | |
tree | 0e5b718814c1301112c215177233cb62c930e026 /src/mongo/db/service_entry_point_common.cpp | |
parent | 7bc98aebab513db686b76f8cc0f406bc874a7ba9 (diff) | |
download | mongo-3a49875934cfd7e70d789b4ad7093286d189acc9.tar.gz |
SERVER-65101 Replace transaction and retryable write command allow lists with methods on Command
Diffstat (limited to 'src/mongo/db/service_entry_point_common.cpp')
-rw-r--r-- | src/mongo/db/service_entry_point_common.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp index 7c0c30e58e7..1ad5e60aa5f 100644 --- a/src/mongo/db/service_entry_point_common.cpp +++ b/src/mongo/db/service_entry_point_common.cpp @@ -1244,7 +1244,7 @@ Future<void> RunCommandImpl::_runImpl() { Future<void> RunCommandImpl::_runCommand() { auto shouldCheckoutSession = _ecd->getSessionOptions().getTxnNumber() && - !shouldCommandSkipSessionCheckout(_ecd->getInvocation()->definition()->getName()); + _ecd->getInvocation()->definition()->shouldCheckoutSession(); if (shouldCheckoutSession) { return future_util::makeState<CheckoutSessionAndInvokeCommand>(_ecd).thenWithState( [](auto* path) { return path->run(); }); @@ -1309,7 +1309,7 @@ void RunCommandAndWaitForWriteConcern::_setup() { // server defaults. So, warn if the operation has not specified writeConcern and is on // a shard/config server. if (!opCtx->getClient()->isInDirectClient() && - (!opCtx->inMultiDocumentTransaction() || isTransactionCommand(command->getName()))) { + (!opCtx->inMultiDocumentTransaction() || command->isTransactionCommand())) { if (_isInternalClient()) { // WriteConcern should always be explicitly specified by operations received // from internal clients (ie. from a mongos or mongod), even if it is empty |