MongoDB DBA · Question 272 · Multiple choice

50. Consider the output of the db.isMaster() command: db.isMaster() { "hosts": [ "node01:27017", "node02:27017", "node03:27017" ], "setName": "RS-0", "setVersion": 1, "ismaster": true, "secondary": false, "primary": "node02:27017", "me": "node02:27017", "electionId": ObjectId("7fffffff0000000000000002"), "lastWrite": { ... }, "maxBsonObjectSize": 16777216, "maxMessageSizeBytes": 48000000, "maxWriteBatchSize": 100000, "localTime": ISODate("2019-01-08T11:22:48.743Z"), "logicalSessionTimeoutMinutes": 30, "minWireVersion": 0, "maxWireVersion": 7, "readOnly": false, "ok": 1, "operationTime": Timestamp(1546946564, 1), "$clusterTime": { ... } } Which of the following are true of the replica set RS-0: Check all that apply:

Answer options

  1. A.
    There are three visible nodes in the replica set
  2. B.
    Node node02:27017 is able to accept write commands.
  3. C.
    The db.isMaster() command was processed in the primary node

Answer confidence: High

Correct answer: A, B, C

Explanation language: Chinese

ismaster: true 且 me 与 primary 都是 node02:27017,说明命令就是在主节点上执行的(A);hosts 列出 node01/02/03 三个成员,即三个可见节点(B);node02 是主节点且 readOnly: false,可以接受写命令(C)。隐藏/延迟节点不会出现在 hosts 列表里,这正是 B 用"visible"措辞的原因。

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 ↗