[SERVER-2434] Filter "db.currentOp()" to remove writebacklisten ops and more Created: 29/Jan/11  Updated: 12/Jul/16  Resolved: 22/Feb/13

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 1.6.5, 1.7.0, 1.7.1
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Adrien Mogenet Assignee: Unassigned
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

In a sharded configuration, db.currentOp() outputs lots of "writebacklisten" operations.
Because this is only relative to technical behavior, it can make the output less readable for the user.

The idea is to be able to remove these information, or maybe to let the user giving some criteria :

> db.currentOp(

{ active: 1 }

)
> db.currentOp( { running_secs: { $gt: 60 }} )
> db.currentOp(

{ usersQueryOnly: 1 }

)



 Comments   
Comment by Eliot Horowitz (Inactive) [ 22/Feb/13 ]

Both of these things are in 2.2.
You can send a filter to only get a subset.
And writeback is suppressed

Comment by Eliot Horowitz (Inactive) [ 22/Feb/11 ]

Undetermined. So under the right conditions, could last indefinitely.

Comment by Benedikt Waldvogel [ 21/Feb/11 ]

what is the timeout setting in 1.6.5?

Comment by Eliot Horowitz (Inactive) [ 21/Feb/11 ]

No, those are just older ones that will timeout.
We cleaned it up in 1.8 so they'll go away faster (30 seconds) when a mongos goes down

Comment by Benedikt Waldvogel [ 21/Feb/11 ]

version is 1.6.5, 64bit.
yes, mongos was restarted
do you need more info or data?

Comment by Eliot Horowitz (Inactive) [ 21/Feb/11 ]

@Benedikt what version is that with? did the mongos restart?

Comment by Benedikt Waldvogel [ 21/Feb/11 ]

Here are the three operations as reported by db.currentOp():

{ "opid" : 2265 , "active" : true , "waitingForLock" : false , "secs_running" : 423767 , "op" : "query" , "ns" : "?" , "query" : { "writebacklisten" : { "$oid" : "4d5c0787ed2546d099c3030a"}} , "client" : "192.168.236.122:36071" , "desc" : "conn"}
{ "opid" : 2756 , "active" : true , "waitingForLock" : false , "secs_running" : 423694 , "op" : "query" , "ns" : "?" , "query" : { "writebacklisten" : { "$oid" : "4d5c08fb64e15ac823fb8d15"}} , "client" : "192.168.236.122:51515" , "desc" : "conn"}
{ "opid" : 42381690 , "active" : true , "waitingForLock" : false , "secs_running" : 266603 , "op" : "query" , "ns" : "?" , "query" : { "writebacklisten" : { "$oid" : "4d5e6ea5954c10c8dc959209"}} , "client" : "192.168.236.122:35827" , "desc" : "conn"}

I've checked the three sockets and noticed that only the last one shows up with "sudo netstat -tulpena | grep ..."

Comment by Eliot Horowitz (Inactive) [ 21/Feb/11 ]

Can you send the actual output? A little hard to tell just from that.

Comment by Benedikt Waldvogel [ 21/Feb/11 ]

I have one mongos that has 3 active "writebacklisten" operations to one mongod that are all running since 3 days or more. Is this normal too?

Comment by Eliot Horowitz (Inactive) [ 21/Feb/11 ]

Those are 100% normal.
Every mongos has 1 connection doing a writeback operation to every mongod at all times

Comment by Benedikt Waldvogel [ 21/Feb/11 ]

I'm also disturbed by a lot of (active) "writebacklisten" operations.
What are those operations for and when do they appear/disappear?

Generated at Thu Feb 08 02:59:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.