4. Consider the following chunk document: use config db.chunks.findOne() { "_id": "config.system.sessions-abc-yxz", "ns": "config.system.sessions", "min": { "userId": 1, "sessionId": "US00001" }, "max": { "userId": 10, "sessionId": "US00001" }, "shard": "sh-1", "lastmod": Timestamp(0,1), "lastmodEpoch": ObjectId("ac78f355843b62a6d5a33a76") } Which of following documents would be included in this chunk ? Check all that apply:
Answer options
- A.{ "userId": 9, "sessionId": "US00001" }
- B.{ "userId": 1, "sessionId": "US00001" }
- C.{ "userId": 10, "sessionId": "US00001" }
Answer confidence: High
Correct answer: A, B
Explanation language: Chinese
chunk 的区间是左闭右开 [min, max):本 chunk 中 userId 的取值范围是 1(含)到 10(不含),sessionId 的上下界相同(US00001),因此 userId=1(B)和 userId=9(A)属于本 chunk;userId=10 正好是上界,落在下一个 chunk 里,C 不选。