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:
题目选项
- A.There are three visible nodes in the replica set
- B.Node node02:27017 is able to accept write commands.
- 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"措辞的原因。