[SERVER-16529] db.currentOp(true) missing BackgroundJob stats for 2.8 Created: 12/Dec/14  Updated: 27/Oct/15  Resolved: 16/Dec/14

Status: Closed
Project: Core Server
Component/s: Diagnostics, Storage
Affects Version/s: 2.8.0-rc2
Fix Version/s: 2.8.0-rc3

Type: Bug Priority: Trivial - P5
Reporter: Jalpa Trivedi (Inactive) Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-4542 Update currentOp output example to re... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

db.currentOp(true) command used to show detailed stats for "signalProcessingThread", "initiandlisten", "DataFileSync", "journal", "TTLMonitor", "RangeDeleter" in 2.6 but not anymore in 2.8/2.8WT. In 2.8/2.8WT it only shows threadId for these.

  • In 2.6:

{
	"inprog" : [
		{
			"opid" : 0,
			"active" : false,
			"op" : "none",
			"ns" : "",
			"query" : {
				
			},
			"desc" : "signalProcessingThread",
			"threadId" : "0x7fcca6a6b700",
			"waitingForLock" : false,
			"numYields" : 0,
			"lockStats" : {
				"timeLockedMicros" : {
					
				},
				"timeAcquiringMicros" : {
					
				}
			}
		},
		{
			"opid" : 1,
			"active" : false,
			"op" : "none",
			"ns" : "",
			"query" : {
				
			},
			"desc" : "DataFileSync",
			"threadId" : "0x7fcca626a700",
			"waitingForLock" : false,
			"numYields" : 0,
			"lockStats" : {
				"timeLockedMicros" : {
					
				},
				"timeAcquiringMicros" : {
					
				}
			}
		},
		{
			"opid" : 10,
			"active" : false,
			"op" : "insert",
			"ns" : "local.startup_log",
			"insert" : {
				
			},
			"client" : "0.0.0.0:0",
			"desc" : "initandlisten",
			"threadId" : "0x7fcca9b6bb80",
			"waitingForLock" : false,
			"numYields" : 0,
			"lockStats" : {
				"timeLockedMicros" : {
					"R" : NumberLong(0),
					"W" : NumberLong(94565)
				},
				"timeAcquiringMicros" : {
					"r" : NumberLong(0),
					"w" : NumberLong(4)
				}
			}
		},
		{
			"opid" : 3,
			"active" : false,
			"op" : "none",
			"ns" : "",
			"query" : {
				
			},
			"desc" : "journal",
			"threadId" : "0x7fcca4e5b700",
			"waitingForLock" : false,
			"numYields" : 0,
			"lockStats" : {
				"timeLockedMicros" : {
					"R" : NumberLong(492),
					"W" : NumberLong(613)
				},
				"timeAcquiringMicros" : {
					"R" : NumberLong(44),
					"W" : NumberLong(6)
				}
			}
		},
		{
			"opid" : 5,
			"active" : false,
			"op" : "none",
			"ns" : "",
			"query" : {
				
			},
			"desc" : "clientcursormon",
			"threadId" : "0x7fcca3d59700",
			"waitingForLock" : false,
			"numYields" : 0,
			"lockStats" : {
				"timeLockedMicros" : {
					
				},
				"timeAcquiringMicros" : {
					
				}
			}
		},
		{
			"opid" : 6,
			"active" : false,
			"op" : "none",
			"ns" : "",
			"query" : {
				
			},
			"desc" : "TTLMonitor",
			"threadId" : "0x7fcca2d57700",
			"waitingForLock" : false,
			"numYields" : 0,
			"lockStats" : {
				"timeLockedMicros" : {
					
				},
				"timeAcquiringMicros" : {
					
				}
			}
		},
		{
			"opid" : 7,
			"active" : false,
			"op" : "none",
			"ns" : "",
			"query" : {
				
			},
			"desc" : "RangeDeleter",
			"threadId" : "0x7fcca2556700",
			"waitingForLock" : false,
			"numYields" : 0,
			"lockStats" : {
				"timeLockedMicros" : {
					
				},
				"timeAcquiringMicros" : {
					
				}
			}
		},
		{
			"opid" : 12,
			"active" : false,
			"op" : "query",
			"ns" : "",
			"query" : {
				"whatsmyuri" : 1
			},
			"client" : "127.0.0.1:48595",
			"desc" : "conn1",
			"threadId" : "0x7fcca9a43700",
			"connectionId" : 1,
			"waitingForLock" : false,
			"numYields" : 0,
			"lockStats" : {
				"timeLockedMicros" : {
					
				},
				"timeAcquiringMicros" : {
					
				}
			}
		}
	]
}

  • In 2.8:

{
	"inprog" : [
		{
			"desc" : "conn1",
			"threadId" : "0x7f8766050a20",
			"connectionId" : 1,
			"opid" : 9,
			"active" : false,
			"op" : "query",
			"ns" : "",
			"query" : {
				"whatsmyuri" : 1
			},
			"client" : "127.0.0.1:48606",
			"numYields" : 0,
			"locks" : {
				
			},
			"waitingForLock" : false,
			"lockStats" : {
				
			}
		},
		{
			"desc" : "clientcursormon",
			"threadId" : "0x7f8763a98980",
			"opid" : 7,
			"active" : false,
			"op" : "none",
			"ns" : "local.startup_log",
			"query" : {
				
			},
			"numYields" : 0,
			"locks" : {
				
			},
			"waitingForLock" : false,
			"lockStats" : {
				
			}
		},
		{
			"desc" : "TTLMonitor",
			"threadId" : "0x7f8763a987a0"
		},
		{
			"desc" : "RangeDeleter",
			"threadId" : "0x7f8763a985c0"
		},
		{
			"desc" : "journal",
			"threadId" : "0x7f876604ec60"
		},
		{
			"desc" : "DataFileSync",
			"threadId" : "0x7f8763a98200"
		},
		{
			"desc" : "initandlisten",
			"threadId" : "0x7f876604fde0"
		},
		{
			"desc" : "signalProcessingThread",
			"threadId" : "0x7f876604ffa0"
		}
	]
}

  • In 2.8WT:

 
{
	"inprog" : [
		{
			"desc" : "conn1",
			"threadId" : "0x7f7d48982a20",
			"connectionId" : 1,
			"opid" : 7,
			"active" : false,
			"op" : "query",
			"ns" : "",
			"query" : {
				"whatsmyuri" : 1
			},
			"client" : "127.0.0.1:48617",
			"locks" : {
				
			},
			"waitingForLock" : false,
			"lockStats" : {
				
			}
		},
		{
			"desc" : "clientcursormon",
			"threadId" : "0x7f7d429a65c0",
			"opid" : 5,
			"active" : false,
			"op" : "none",
			"ns" : "local.startup_log",
			"query" : {
				
			},
			"locks" : {
				
			},
			"waitingForLock" : false,
			"lockStats" : {
				
			}
		},
		{
			"desc" : "TTLMonitor",
			"threadId" : "0x7f7d429a63e0"
		},
		{
			"desc" : "RangeDeleter",
			"threadId" : "0x7f7d429a6200"
		},
		{
			"desc" : "initandlisten",
			"threadId" : "0x7f7d48981de0"
		},
		{
			"desc" : "signalProcessingThread",
			"threadId" : "0x7f7d48981fa0"
		}
	]
}



 Comments   
Comment by Githook User [ 17/Dec/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16529 Coarser OperationContext scope for background threads

Cuts the number of instantions of operation contexts and increases the
chance that a given maintenance operation would be seen in db.currentOp.

This is just a cosmetic change.
Branch: master
https://github.com/mongodb/mongo/commit/6e655edcca786e7edc0c4b1c05832d50dcd3f760

Comment by Githook User [ 16/Dec/14 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-16529 Report active: false for inactive background threads
Branch: master
https://github.com/mongodb/mongo/commit/98a27c300434ce21c5a0c29d7bd3304964cf0063

Comment by Kaloian Manassiev [ 16/Dec/14 ]

This is expected. In 2.8 we changed the db.currentOp behaviour to not dump empty information for inactive threads. The information for a thread will be provided only if it is active (i.e., doing some work - waiting on a lock, operating on some namespace, etc).

These particular background threads are idle most of the time, waiting either on some event or for a timer, so there is no point in providing empty information.

The only change, which we could do is add the "active: false" field to indicate them as inactive.

Comment by Matt Kangas [ 16/Dec/14 ]

Confirmed with 2.8.0-rc3-pre. This appears to be a regression from 2.6. mongo::BackgroundJob subclasses are not adding details to db.currentOp(true) output beyond this:

                {
                        "desc" : "RangeDeleter",
                        "threadId" : "0x7f1610876980"
                },
                {
                        "desc" : "journal",
                        "threadId" : "0x7f16154bf660"
                },
                {
                        "desc" : "DataFileSync",
                        "threadId" : "0x7f16108765c0"
                },
                {
                        "desc" : "initandlisten",
                        "threadId" : "0x7f16154bf820"
                },
                {
                        "desc" : "signalProcessingThread",
                        "threadId" : "0x7f16154bf9e0"
                }

Generated at Thu Feb 08 03:41:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.