summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/operation_sharding_state.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-08-11 16:43:18 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-08-14 15:29:38 -0400
commit58b36b8bbc6ca7159e100ada6dc15852af0a8661 (patch)
tree16934881e75c10af862aa3f5f7d280c21928246b /src/mongo/db/s/operation_sharding_state.h
parent2176ab64295b23e8c67f7799d1310791f14db147 (diff)
downloadmongo-58b36b8bbc6ca7159e100ada6dc15852af0a8661.tar.gz
SERVER-30424 Remove opCtx/serviceContext null checks from db.cpp since ServiceContext must always exist
Diffstat (limited to 'src/mongo/db/s/operation_sharding_state.h')
-rw-r--r--src/mongo/db/s/operation_sharding_state.h25
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