MongoDB db.serverStatus() 没有 storageEngine 输出

MongoDB db.serverStatus() 没有 storageEngine 输出

我有一个带有 WiredTiger 的 MongoDB 4.0.6 实例,文档说 db.serverStatus() 在输出中有一个 storageEngine 部分,其中包含一些有关 Wired Tiger 标志的信息。在我的实例上,输出中根本没有 storageEngine 部分。我是不是漏掉了什么?

具体来说,我有一个分片集群,其中有一个 3 节点副本集,其中一个节点是仲裁器,这会导致在快速创建大量记录时 WiredTigerLAS.wt 文件不断增长。文档说我们可以使用“--enableMajorityReadConcern false”关闭 readConcernMajority,我们已经这样做了。不会停止后备文件的增长。我想检查该标志的状态,并再次按照文档使用 db.serverStatus(),但与文档相反,输出根本不包含 storageEngine 部分。

也许我应该将仲裁器改为数据承载节点,但我希望避免成本。任何有关此问题的帮助都将不胜感激。

添加 rs.status()(请注意,辅助服务器目前正在与主服务器重新同步):

{
        "set" : "shardRS1",
        "date" : ISODate("2019-06-06T17:09:06.986Z"),
        "myState" : 2,
        "term" : NumberLong(66),
        "syncingTo" : "1b:27018",
        "syncSourceHost" : "1b:27018",
        "syncSourceId" : 0,
        "heartbeatIntervalMillis" : NumberLong(2000),
        "optimes" : {
                "lastCommittedOpTime" : {
                        "ts" : Timestamp(1559840946, 1),
                        "t" : NumberLong(66)
                },
                "readConcernMajorityOpTime" : {
                        "ts" : Timestamp(1559840946, 1),
                        "t" : NumberLong(66)
                },
                "appliedOpTime" : {
                        "ts" : Timestamp(1559840946, 1),
                        "t" : NumberLong(66)
                },
                "durableOpTime" : {
                        "ts" : Timestamp(1559840946, 1),
                        "t" : NumberLong(66)
                }
        },
        "members" : [
                {
                        "_id" : 0,
                        "name" : "1b:27018",
                        "health" : 1,
                        "state" : 1,
                        "stateStr" : "PRIMARY",
                        "uptime" : 177202,
                        "optime" : {
                                "ts" : Timestamp(1559840936, 1),
                                "t" : NumberLong(66)
                        },
                        "optimeDurable" : {
                                "ts" : Timestamp(1559840936, 1),
                                "t" : NumberLong(66)
                        },
                        "optimeDate" : ISODate("2019-06-06T17:08:56Z"),
                        "optimeDurableDate" : ISODate("2019-06-06T17:08:56Z"),
                        "lastHeartbeat" : ISODate("2019-06-06T17:09:05.722Z"),
                        "lastHeartbeatRecv" : ISODate("2019-06-06T17:09:05.263Z"),
                        "pingMs" : NumberLong(0),
                        "lastHeartbeatMessage" : "",
                        "syncingTo" : "",
                        "syncSourceHost" : "",
                        "syncSourceId" : -1,
                        "infoMessage" : "",
                        "electionTime" : Timestamp(1559662230, 1),
                        "electionDate" : ISODate("2019-06-04T15:30:30Z"),
                        "configVersion" : 2
                },
                {
                        "_id" : 1,
                        "name" : "1d:27018",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 177203,
                        "optime" : {
                                "ts" : Timestamp(1559840946, 1),
                                "t" : NumberLong(66)
                        },
                        "optimeDate" : ISODate("2019-06-06T17:09:06Z"),
                        "syncingTo" : "1b:27018",
                        "syncSourceHost" : "1b:27018",
                        "syncSourceId" : 0,
                        "infoMessage" : "",
                        "configVersion" : 2,
                        "self" : true,
                        "lastHeartbeatMessage" : ""
                },
                {
                        "_id" : 2,
                        "name" : "1c:27018",
                        "health" : 1,
                        "state" : 7,
                        "stateStr" : "ARBITER",
                        "uptime" : 177202,
                        "lastHeartbeat" : ISODate("2019-06-06T17:09:05.933Z"),
                        "lastHeartbeatRecv" : ISODate("2019-06-06T17:09:05.468Z"),
                        "pingMs" : NumberLong(1),
                        "lastHeartbeatMessage" : "",
                        "syncingTo" : "",
                        "syncSourceHost" : "",
                        "syncSourceId" : -1,
                        "infoMessage" : "",
                        "configVersion" : 2
                }
        ],
        "ok" : 1,
        "operationTime" : Timestamp(1559840946, 1),
        "$gleStats" : {
                "lastOpTime" : Timestamp(0, 0),
                "electionId" : ObjectId("000000000000000000000000")
        },
        "lastCommittedOpTime" : Timestamp(1559840946, 1),
        "$configServerState" : {
                "opTime" : {
                        "ts" : Timestamp(1559840926, 1),
                        "t" : NumberLong(35)
                }
        },
        "$clusterTime" : {
                "clusterTime" : Timestamp(1559840946, 1),
                "signature" : {
                        "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                        "keyId" : NumberLong(0)
                }
        }
}

添加 rs.conf():

{
        "_id" : "shardRS1",
        "version" : 2,
        "protocolVersion" : NumberLong(1),
        "writeConcernMajorityJournalDefault" : true,
        "members" : [
                {
                        "_id" : 0,
                        "host" : "1b:27018",
                        "arbiterOnly" : false,
                        "buildIndexes" : true,
                        "hidden" : false,
                        "priority" : 1,
                        "tags" : {

                        },
                        "slaveDelay" : NumberLong(0),
                        "votes" : 1
                },
                {
                        "_id" : 1,
                        "host" : "1d:27018",
                        "arbiterOnly" : false,
                        "buildIndexes" : true,
                        "hidden" : false,
                        "priority" : 1,
                        "tags" : {

                        },
                        "slaveDelay" : NumberLong(0),
                        "votes" : 1
                },
                {
                        "_id" : 2,
                        "host" : "1c:27018",
                        "arbiterOnly" : true,
                        "buildIndexes" : true,
                        "hidden" : false,
                        "priority" : 0,
                        "tags" : {

                        },
                        "slaveDelay" : NumberLong(0),
                        "votes" : 1
                }
        ],
        "settings" : {
                "chainingAllowed" : true,
                "heartbeatIntervalMillis" : 2000,
                "heartbeatTimeoutSecs" : 10,
                "electionTimeoutMillis" : 10000,
                "catchUpTimeoutMillis" : -1,
                "catchUpTakeoverDelayMillis" : 30000,
                "getLastErrorModes" : {

                },
                "getLastErrorDefaults" : {
                        "w" : 1,
                        "wtimeout" : 0
                },
                "replicaSetId" : ObjectId("5c8743e6b6916b268c071e3a")
        }
}

相关内容