diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2018-08-21 10:50:04 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2019-02-27 10:51:15 -0500 |
commit | b049257fbd1d215388cffaf7544f6741dbce5b45 (patch) | |
tree | 90e385d3c5af33c64f2dc8b590447c606c58f611 /src/mongo/db/s/operation_sharding_state.h | |
parent | 6df5463e57c068a653f27fa44daaa619453d602f (diff) | |
download | mongo-b049257fbd1d215388cffaf7544f6741dbce5b45.tar.gz |
SERVER-39495 Move ShardingState::needCollectionMetadata under OperationShardingState
ShardingState logically contains answers to questions about whether the
current instance is node in a sharded cluster, whereas
OperationShardingState is responsible for the 'shardedness' of the
commands.
Diffstat (limited to 'src/mongo/db/s/operation_sharding_state.h')
-rw-r--r-- | src/mongo/db/s/operation_sharding_state.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/s/operation_sharding_state.h b/src/mongo/db/s/operation_sharding_state.h index 03c71c86fba..4358d6c9a21 100644 --- a/src/mongo/db/s/operation_sharding_state.h +++ b/src/mongo/db/s/operation_sharding_state.h @@ -63,6 +63,13 @@ public: static OperationShardingState& get(OperationContext* opCtx); /** + * Returns true if the the current operation was sent by the caller with shard version + * information attached, meaning that it must perform shard version checking and orphan + * filtering. + */ + static bool isOperationVersioned(OperationContext* opCtx); + + /** * Requests on a sharded collection that are broadcast without a shardVersion should not cause * the collection to be created on a shard that does not know about the collection already, * since the collection options will not be propagated. Such requests specify to disallow |