Splitting Shards

For chunk [lowbound,highbound)->shard, there are two types of splits we can perform.  In one case, we split the range s.t. both new chunks have about the same number of values, in another, we split the range but one of the new chunk is empty.

When at least one bound is MinKey or MaxKey, we choose a split strategy s.t. all existing values remain in one chunk.  For example:

chunk [MinKey, MaxKey) values { 1,5,9,12 }
  becomes
chunk [MinKey, 13) values { 1,5,9,12 }
chunk [13, MaxKey) values { }

whereas

chunk [0 , 15) values { 1,5,9,12 }
  becomes
chunk [0, 9) values { 1,5 }
chunk [9, 15) values { 9,12 }

This approach is more efficient when items are added in key order.


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

IF YOU HAVE A QUESTION, POST IT TO THE USER GROUP.

These pages are fine for comments, but for questions, your best bet will always be the MongoDB User Group.

blog comments powered by Disqus