MongoDB DBA · Question 286 · Multiple choice

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

  1. A.
    { "userId": 9, "sessionId": "US00001" }
  2. B.
    { "userId": 1, "sessionId": "US00001" }
  3. 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 不选。

Papers containing this question

This question appears in 3 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.

AUTHOR · PROJECTS · OPEN SOURCE

Author & MongoDB projects

Building data platforms, MongoDB migration and sync tools, and cloud operations products.

Contact the author for any MongoDB needs.

Contact the author ↗mlhp123@outlook.com

Support the author

If this question bank helps you, optional donations are welcome.

Scan with Alipay to support the authorOpen full-size donation image ↗