diff options
author | Israel Hsu <israel.hsu@mongodb.com> | 2023-02-15 22:18:29 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-16 04:34:51 +0000 |
commit | 924f756576cfaad5a4253736394ae3e8973c79bb (patch) | |
tree | d895f49e0884fade8df5f349dd01e786602b432b /src/mongo/s/commands/cluster_find_and_modify_cmd.cpp | |
parent | 2942a939de7e5c6a4fe0ea93fc3ae2fb2d815f75 (diff) | |
download | mongo-924f756576cfaad5a4253736394ae3e8973c79bb.tar.gz |
SERVER-70997 Implement query sampler counters for $currentOp
Diffstat (limited to 'src/mongo/s/commands/cluster_find_and_modify_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_find_and_modify_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp index 52fae27f850..c0f9ca86f62 100644 --- a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp +++ b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp @@ -324,7 +324,8 @@ BSONObj prepareCmdObjForPassthrough(OperationContext* opCtx, const boost::optional<ShardVersion>& shardVersion) { BSONObj filteredCmdObj = CommandHelpers::filterCommandRequestForPassthrough(cmdObj); if (!isExplain) { - if (auto sampleId = analyze_shard_key::tryGenerateSampleId(opCtx, nss)) { + if (auto sampleId = analyze_shard_key::tryGenerateSampleId( + opCtx, nss, cmdObj.firstElementFieldNameStringData())) { filteredCmdObj = analyze_shard_key::appendSampleId(std::move(filteredCmdObj), std::move(*sampleId)); } |