mongodb的isMaster

 

 

glc-test:PRIMARY> db.isMaster()
{
        "hosts" : [
                "xxx:28042",
                "yyy:28042",
                "aaa:28042",
                "bbb:28042",
                "ccc:28042"
        ],
        "setName" : "glc-test",
        "setVersion" : 13,
        "ismaster" : true,
        "secondary" : false,
        "primary" : "xxx:28042",
        "me" : "xxx:28042",
        "electionId" : ObjectId("7fffffff0000000000000077"),
        "lastWrite" : {
                "opTime" : {
                        "ts" : Timestamp(1606377817, 1),
                        "t" : NumberLong(119)
                },
                "lastWriteDate" : ISODate("2020-11-26T08:03:37Z"),
                "majorityOpTime" : {
                        "ts" : Timestamp(1606377817, 1),
                        "t" : NumberLong(119)
                },
                "majorityWriteDate" : ISODate("2020-11-26T08:03:37Z")
        },
        "maxBsonObjectSize" : 16777216,
        "maxMessageSizeBytes" : 48000000,
        "maxWriteBatchSize" : 100000,
        "localTime" : ISODate("2020-11-26T08:03:40.362Z"),
        "logicalSessionTimeoutMinutes" : 30,
        "minWireVersion" : 0,
        "maxWireVersion" : 7,
        "readOnly" : false,
        "ok" : 1,
        "operationTime" : Timestamp(1606377817, 1),
        "$clusterTime" : {
                "clusterTime" : Timestamp(1606377817, 1),
                "signature" : {
                        "hash" : BinData(0,"RUi4U+azZibNg3eFUNRr2mlU8Zg="),
                        "keyId" : NumberLong("6856584343653974019")
                }
        }
}

glc-test:PRIMARY> db.isMaster().ismaster
true
glc-test:PRIMARY> db.isMaster().secondary
false
glc-test:PRIMARY> db.isMaster().setName
glc-test
glc-test:PRIMARY>




 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

#####################################

posted @ 2020-11-26 16:12  igoodful  阅读(977)  评论(0编辑  收藏  举报