diff options
Diffstat (limited to 'src/mongo/db/s/operation_sharding_state.h')
-rw-r--r-- | src/mongo/db/s/operation_sharding_state.h | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/mongo/db/s/operation_sharding_state.h b/src/mongo/db/s/operation_sharding_state.h index d4a0e778af1..53ed73f89af 100644 --- a/src/mongo/db/s/operation_sharding_state.h +++ b/src/mongo/db/s/operation_sharding_state.h @@ -32,8 +32,8 @@ #include "mongo/base/disallow_copying.h" #include "mongo/db/namespace_string.h" -#include "mongo/db/s/migration_source_manager.h" #include "mongo/s/chunk_version.h" +#include "mongo/util/concurrency/notification.h" namespace mongo { @@ -51,8 +51,6 @@ class OperationShardingState { MONGO_DISALLOW_COPYING(OperationShardingState); public: - class IgnoreVersioningBlock; - OperationShardingState(); /** @@ -129,25 +127,4 @@ private: std::shared_ptr<Notification<void>> _migrationCriticalSectionSignal; }; -/** - * RAII type that sets the shard version for the current operation to IGNORED in its constructor, - * then restores the original version in its destructor. Used for temporarily disabling shard - * version checking for certain operations, such as multi-updates, that need to be unversioned - * but may be part of a larger group of operations with a single OperationContext where the other - * sub-operations might still require versioning. - */ -class OperationShardingState::IgnoreVersioningBlock { - MONGO_DISALLOW_COPYING(IgnoreVersioningBlock); - -public: - IgnoreVersioningBlock(OperationContext* opCtx, const NamespaceString& ns); - ~IgnoreVersioningBlock(); - -private: - OperationContext* _opCtx; - NamespaceString _ns; - ChunkVersion _originalVersion; - bool _hadOriginalVersion; -}; - } // namespace mongo |