MongoDB DBA · 题目 272 · 多选

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:

题目选项

  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

答案置信度:高

正确答案:A、B、C

解析语言:中文

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

所在套题

此题在题库中有 3 条记录。公开详情合并相同题干和选项;完整公开题展示置信度最高的一条记录,其他题目仅展示摘要。按套学习保留每条记录原有的答案、解析和置信度。

作者 · 作品 · 开源

作者与 MongoDB 作品

专注数据平台、MongoDB 迁移同步与云运维产品研发。

有任何 MongoDB 需求,均可联系作者。

联系作者 ↗mlhp123@outlook.com

支持作者

如果题库对您有帮助,欢迎自愿扫码打赏。

支付宝扫码打赏作者打开打赏原图 ↗