diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2023-01-30 16:35:56 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-31 02:23:21 +0000 |
commit | 8aca0afe03fd7f9c3041463a470c7758e3c2a73e (patch) | |
tree | 956dab3499b3968fa24bbb8fa6925eea24f7098b /src/mongo/s/write_ops/write_without_shard_key_util.cpp | |
parent | 1b0c8231c24f550fc24453c3ce220eb58ba83663 (diff) | |
download | mongo-8aca0afe03fd7f9c3041463a470c7758e3c2a73e.tar.gz |
SERVER-73238 Move some shard_key_pattern query methods out of 'grid'
Diffstat (limited to 'src/mongo/s/write_ops/write_without_shard_key_util.cpp')
-rw-r--r-- | src/mongo/s/write_ops/write_without_shard_key_util.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/s/write_ops/write_without_shard_key_util.cpp b/src/mongo/s/write_ops/write_without_shard_key_util.cpp index 2867ad0b9ac..cb2d2d12884 100644 --- a/src/mongo/s/write_ops/write_without_shard_key_util.cpp +++ b/src/mongo/s/write_ops/write_without_shard_key_util.cpp @@ -26,6 +26,7 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ + #include "mongo/s/write_ops/write_without_shard_key_util.h" #include "mongo/bson/bsonobj.h" @@ -37,6 +38,7 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/cluster_commands_without_shard_key_gen.h" +#include "mongo/s/shard_key_pattern_query_util.h" #include "mongo/s/transaction_router_resource_yielder.h" #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding @@ -138,7 +140,7 @@ bool useTwoPhaseProtocol(OperationContext* opCtx, } auto shardKey = - uassertStatusOK(cm.getShardKeyPattern().extractShardKeyFromQuery(opCtx, nss, query)); + uassertStatusOK(extractShardKeyFromBasicQuery(opCtx, nss, cm.getShardKeyPattern(), query)); // 'shardKey' will only be populated only if a full equality shard key is extracted. if (shardKey.isEmpty()) { |