diff options
Diffstat (limited to 'src/mongo/s/cluster_commands_helpers.h')
-rw-r--r-- | src/mongo/s/cluster_commands_helpers.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/s/cluster_commands_helpers.h b/src/mongo/s/cluster_commands_helpers.h index a2b1c6465f3..9b097f92a09 100644 --- a/src/mongo/s/cluster_commands_helpers.h +++ b/src/mongo/s/cluster_commands_helpers.h @@ -218,6 +218,18 @@ std::set<ShardId> getTargetedShardsForQuery(OperationContext* opCtx, const BSONObj& collation); /** + * Determines the shard(s) to which the given query will be targeted, and builds a separate + * versioned copy of the command object for each such shard. + */ +std::vector<std::pair<ShardId, BSONObj>> getVersionedRequestsForTargetedShards( + OperationContext* opCtx, + const NamespaceString& nss, + const CachedCollectionRoutingInfo& routingInfo, + const BSONObj& cmdObj, + const BSONObj& query, + const BSONObj& collation); + +/** * If the command is running in a transaction, returns the proper routing table to use for targeting * shards. If there is no active transaction or the transaction is not running with snapshot level * read concern, the latest routing table is returned, otherwise a historical routing table is |