如何解决未显示Mongodb db.serverStatusstorageEngine
我正在使用4.2.8版的MongoDB
存储引擎为wiredTiger
我输入了db.serverStatus()。wiredTiger来监视高速缓存的使用情况,但是未显示storageEngine和wiredTiger字段。
另一方面,由独立用户组成的可以看到这些字段
我们不能在分片集群模式下检查吗?
这是我的分片服务器和配置服务器配置文件
systemLog:
verbosity: 0
traceAllExceptions: true
path: "~~~~~"
logAppend: false
logRotate: "rename"
destination: "file"
timeStampformat: "iso8601-utc"
net:
port: 20001
bindIp: "0.0.0.0"
storage:
dbPath: "~~~~~~"
journal:
enabled: true
commitIntervalMs: 100
directoryPerDB: true
engine: "wiredTiger"
wiredTiger:
engineConfig:
cacheSizeGB: 1.0
collectionConfig:
blockCompressor: "snappy"
indexConfig:
prefixCompression: true
security:
keyFile: "~~~~~"
sharding:
clusterRole: "configsvr"
replication:
replSetName: "config-server"
systemLog:
verbosity: 0
traceAllExceptions: true
path: "~~~~~~"
logAppend: false
logRotate: "rename"
destination: "file"
timeStampformat: "iso8601-utc"
net:
port: 20002
bindIp: "0.0.0.0"
storage:
dbPath: "~~~~"
journal:
enabled: true
commitIntervalMs: 100
directoryPerDB: true
engine: "wiredTiger"
wiredTiger:
engineConfig:
cacheSizeGB: 10.0
collectionConfig:
blockCompressor: "snappy"
indexConfig:
prefixCompression: true
security:
keyFile: "~~~~~"
sharding:
clusterRole: "shardsvr"
replication:
replSetName: "shard1-server"
解决方法
mongos本身不存储任何数据,这可能就是为什么它不报告存储引擎的原因。
从理论上讲,我不知道您是否可以在不同的分片中使用不同的存储引擎。
您可以使用https://docs.mongodb.com/manual/reference/command/listShards/来识别分片,并在每个分片中查询其存储引擎。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。