summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/sharding_state.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-03-22 14:21:30 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-03-23 09:10:57 -0400
commitd9a1dd9dbd4349b18151a3223a718cf1642cd5b6 (patch)
tree938a3a971582ee8eca9b5969be1a2b0e1ee12a10 /src/mongo/db/s/sharding_state.h
parent4deaa5883717145719caaca5002aa3ce4bf1fc76 (diff)
downloadmongo-d9a1dd9dbd4349b18151a3223a718cf1642cd5b6.tar.gz
SERVER-23296 Move pending chunk management under MigrationDestinationManager
Moves the code, which manipulates the pending chunk data to reside under the migration destination manager instead of the global sharding state and makes it use the collection sharding state instead of the global map.
Diffstat (limited to 'src/mongo/db/s/sharding_state.h')
-rw-r--r--src/mongo/db/s/sharding_state.h37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/mongo/db/s/sharding_state.h b/src/mongo/db/s/sharding_state.h
index 80bc441a30c..18aee698093 100644
--- a/src/mongo/db/s/sharding_state.h
+++ b/src/mongo/db/s/sharding_state.h
@@ -196,8 +196,6 @@ public:
std::shared_ptr<CollectionMetadata> getCollectionMetadata(const std::string& ns);
- // chunk migrate and split support
-
/**
* Creates and installs a new chunk metadata for a given collection by "forgetting" about
* one of its chunks. The new metadata uses the provided version, which has to be higher
@@ -240,41 +238,6 @@ public:
std::shared_ptr<CollectionMetadata> prevMetadata);
/**
- * Remembers a chunk range between 'min' and 'max' as a range which will have data migrated
- * into it. This data can then be protected against cleanup of orphaned data.
- *
- * Overlapping pending ranges will be removed, so it is only safe to use this when you know
- * your metadata view is definitive, such as at the start of a migration.
- *
- * @return false with errMsg if the range is owned by this shard
- */
- bool notePending(OperationContext* txn,
- const std::string& ns,
- const BSONObj& min,
- const BSONObj& max,
- const OID& epoch,
- std::string* errMsg);
-
- /**
- * Stops tracking a chunk range between 'min' and 'max' that previously was having data
- * migrated into it. This data is no longer protected against cleanup of orphaned data.
- *
- * To avoid removing pending ranges of other operations, ensure that this is only used when
- * a migration is still active.
- * TODO: Because migrations may currently be active when a collection drops, an epoch is
- * necessary to ensure the pending metadata change is still applicable.
- *
- * @return false with errMsg if the range is owned by the shard or the epoch of the metadata
- * has changed
- */
- bool forgetPending(OperationContext* txn,
- const std::string& ns,
- const BSONObj& min,
- const BSONObj& max,
- const OID& epoch,
- std::string* errMsg);
-
- /**
* Creates and installs a new chunk metadata for a given collection by splitting one of its
* chunks in two or more. The version for the first split chunk should be provided. The
* subsequent chunks' version would be the latter with the minor portion incremented.