gpt4 book ai didi

MongoDB local.oplog.rs 查询长时间运行

转载 作者:行者123 更新时间:2023-12-02 03:10:53 25 4
gpt4 key购买 nike

我有 2 个节点集群(8 个 vCPU,52 GB)用于 mongodb(3.2.0)。我正在调试几个需要几秒钟的查询,我运行了 db.currentOp()查看正在运行哪些查询以及它们花费了多少时间,我发现了一个关于 local.oplog.rs 的查询运行时间超过 4000 秒,以下是相关查询

         {
"desc" : "WT RecordStoreThread: local.oplog.rs",
"threadId" : "139625785952000",
"active" : true,
"opid" : "rs0:145981225",
"secs_running" : 4168,
"microsecs_running" : NumberLong("4168129663"),
"op" : "none",
"ns" : "local.oplog.rs",
"query" : {

},
"numYields" : 0,
"locks" : {

},
"waitingForLock" : false,
"lockStats" : {
"Global" : {
"acquireCount" : {
"r" : NumberLong(1),
"w" : NumberLong(1)
}
},
"Database" : {
"acquireCount" : {
"w" : NumberLong(1)
}
},
"oplog" : {
"acquireCount" : {
"w" : NumberLong(1)
}
}
}
},

有人可以解释一下吗?这个查询在做什么,我应该担心吗?

最佳答案

这些是与复制相关的线程。它们是正常操作的一部分。

  • WT RecordStoreThread:local.oplog.rs
  • rsSync
  • rsBackgroundSync
  • ReplBatcher

实际上存在一个关于默认显示这些结果的公开错误,而这些结果可能应该隐藏,因为它们总是长时间运行的操作:https://jira.mongodb.org/browse/SERVER-28257

来自错误报告:

At present db.currentOp() by default shows replication-related threads such as:

"WT RecordStoreThread: local.oplog.rs"

"rsSync"

"rsBackgroundSync"

"ReplBatcher"

Often these operations are long running and users may get a wrong impression that there is a performance problem.

关于MongoDB local.oplog.rs 查询长时间运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39966449/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com