Ambiguity in Final Exam Question 4

Chunks that contain documents that all share a single value of the shard key cannot be split.

There are two possible interpretations, the first of which is used for the official answer:

  1. Every chunk whose min equals max (all documents within it must have the same shard key value) cannot be split. This is true.
  2. Every chunk that contain documents that all share the same shard key value (but the chunk’s min and max might not necessarily be equal) cannot be split. This is false.

For example, in the second case, if a chunk has a min of { "$minKey" : 1 } and max of { "$maxKey" : 1 } has two documents with shard key value 0, it all of the documents share a single value of 0, but the chunk can still be split into two chunks such as ({ "$minKey" : 1 }, 0) and (0, { "$maxKey" : 1 }).

1 Like