summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/balancer/balancer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/balancer/balancer.h')
-rw-r--r--src/mongo/db/s/balancer/balancer.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/db/s/balancer/balancer.h b/src/mongo/db/s/balancer/balancer.h
index da54de484ac..6fd8b7fbc4b 100644
--- a/src/mongo/db/s/balancer/balancer.h
+++ b/src/mongo/db/s/balancer/balancer.h
@@ -183,10 +183,15 @@ private:
bool _checkOIDs(OperationContext* opCtx);
/**
- * Iterates through all chunks in all collections and ensures that no chunks straddle tag
- * boundary. If any do, they will be split.
+ * Iterates through all chunks in all collections. If the collection is the sessions collection,
+ * checks if the number of chunks is greater than or equal to the configured minimum number of
+ * chunks for the sessions collection (minNumChunksForSessionsCollection). If it isn't,
+ * calculates split points that evenly partition the key space into N ranges (where N is
+ * minNumChunksForSessionsCollection rounded up the next power of 2), and splits any chunks that
+ * straddle those split points. If the collection is any other collection, splits any chunks
+ * that straddle tag boundaries.
*/
- Status _enforceTagRanges(OperationContext* opCtx);
+ Status _splitChunksIfNeeded(OperationContext* opCtx);
/**
* Schedules migrations for the specified set of chunks and returns how many chunks were