-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.2.4, 2.4.3, 2.5.0
-
Component/s: None
-
None
-
ALL
When the splitVector command is run with force==true we set maxChunkSize to the size of the collection. From the comment preceding this code it appears we meant to set maxChunkSize to the size of the chunk we want to split.
Setting maxChunkSize to collection size can lead to an imbalanced split, which in the case of large chunks (larger than chunksize in config.settings) could mean a split where the left side of the split remains large and the right size is very small (potentially a single document).
The relevant code is the following in s/d_split.cpp:
NamespaceDetails *d = nsdetails( ns ); ... const long long dataSize = d->stats.datasize; ... BSONElement forceElem = jsobj[ "force" ]; if ( forceElem.trueValue() ) { force = true; maxChunkSize = dataSize; }
- duplicates
-
SERVER-9365 mongod always split at 250000 position
- Closed