未显示Mongodb db.serverStatus()。storageEngine

时间:2020-09-14 05:20:24

标签: mongodb wiredtiger

我正在使用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"

1 个答案:

答案 0 :(得分:0)

mongos本身不存储任何数据,这可能就是为什么它不报告存储引擎的原因。

从理论上讲,我不知道您是否可以在不同的分片中使用不同的存储引擎。

您可以使用https://docs.mongodb.com/manual/reference/command/listShards/来识别分片,并在每个分片中查询其存储引擎。