Reputation: 12672
I have 2 node cluster(8 vCPUs, 52 GB) for mongodb(3.2.0). I was debugging couple of queries that took several seconds, I ran db.currentOp()
to see what queries are running and how much time they are taking and I found a query regarding local.oplog.rs
that was running for more than 4000 seconds, following is the query in question
{
"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)
}
}
}
},
Could any please shed some light on this? what is this query doing and should I be concerned?
Upvotes: 11
Views: 9113
Reputation: 13646
These are threads related to replication. They're part of normal operation.
WT RecordStoreThread: local.oplog.rs
rsSync
rsBackgroundSync
ReplBatcher
There's actually an open bug about showing these results by default when they should probably be hidden because they're always long running operations: https://jira.mongodb.org/browse/SERVER-28257
From the bug report:
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.
Upvotes: 7