summaryrefslogtreecommitdiff
path: root/src/mongo/s/chunk.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-04-06 13:36:35 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-04-12 14:04:20 -0400
commit3c5ee8b721d3ea5b18d22527fcbea4e2e15e79ad (patch)
treede1c103b277da2e69f0dce58b13125d8afcd8146 /src/mongo/s/chunk.h
parent9c2e3c15fc7874ea610bad23d9cafe46b22b1cb5 (diff)
downloadmongo-3c5ee8b721d3ea5b18d22527fcbea4e2e15e79ad.tar.gz
SERVER-22667 Move Chunk::pickSplitVector/MedianKey out of Chunk
The pickSplitVector and selectMedianKey utilities logically belong to the balancer, so moving them out of the Chunk class and into shard_util. The changes to balance.cpp have no functional effect, just rearranging them to better match the balancer control flow and to make the subsequent changes easier to follow.
Diffstat (limited to 'src/mongo/s/chunk.h')
-rw-r--r--src/mongo/s/chunk.h24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/mongo/s/chunk.h b/src/mongo/s/chunk.h
index 0adb301bf23..553c0bbec9d 100644
--- a/src/mongo/s/chunk.h
+++ b/src/mongo/s/chunk.h
@@ -160,26 +160,6 @@ public:
const std::vector<BSONObj>& splitPoints,
BSONObj* res) const;
- /**
- * Asks the mongod holding this chunk to find a key that approximately divides this chunk in two
- *
- * @param medianKey the key that divides this chunk, if there is one, or empty
- */
- void pickMedianKey(OperationContext* txn, BSONObj& medianKey) const;
-
- /**
- * Ask the mongod holding this chunk to figure out the split points.
- * @param splitPoints vector to be filled in
- * @param chunkSize chunk size to target in bytes
- * @param maxPoints limits the number of split points that are needed, zero is max (optional)
- * @param maxObjs limits the number of objects in each chunk, zero is as max (optional)
- */
- void pickSplitVector(OperationContext* txn,
- std::vector<BSONObj>& splitPoints,
- long long chunkSize,
- int maxPoints = 0,
- int maxObjs = 0) const;
-
//
// migration support
//
@@ -300,9 +280,7 @@ private:
* @param atMedian perform a single split at the middle of this chunk.
* @param splitPoints out parameter containing the chosen split points. Can be empty.
*/
- void determineSplitPoints(OperationContext* txn,
- bool atMedian,
- std::vector<BSONObj>* splitPoints) const;
+ std::vector<BSONObj> _determineSplitPoints(OperationContext* txn, bool atMedian) const;
/**
* initializes _dataWritten with a random value so that a mongos restart