-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.5.5
-
ALL
The reason for lies in here:
https://github.com/mongodb/mongo/blob/r2.5.5/src/mongo/s/commands_public.cpp#L1790-1804
// do the splitting round ChunkManagerPtr cm = confOut->getChunkManagerIfExists( finalColLong ); for ( map<BSONObj, int>::iterator it = chunkSizes.begin() ; it != chunkSizes.end() ; ++it ) { BSONObj key = it->first; int size = it->second; verify( size < 0x7fffffff ); // key reported should be the chunk's minimum ChunkPtr c = cm->findIntersectingChunk(key); if ( !c ) { warning() << "Mongod reported " << size << " bytes inserted for key " << key << " but can't find chunk" << endl; } else { c->splitIfShould( size ); } }
Note that mongos calls Chunk::splitIfShould, which performs a split with only a single split point. This means that if the resulting chunk is multiples larger than the chunk size, a small section of the chunk will be split into a new chunk. For example, if chunkSize is 1 and resulting chunk is 5, the split operation will split the chunk into size 1 and size 4.
- duplicates
-
SERVER-13402 bulk insert can result in too large chunks
- Closed
- is related to
-
SERVER-12580 Improve mrShardedOutput.js
- Closed
- related to
-
SERVER-14324 MapReduce does not respect existing shard key on output:sharded
- Closed
-
SERVER-43527 Complete TODO listed in SERVER-12581
- Closed