[SERVER-21276] write activity not reflected in output of "top" Created: 03/Nov/15  Updated: 17/Nov/15  Resolved: 12/Nov/15

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: 3.2.0-rc3

Type: Bug Priority: Major - P3
Reporter: Michael O'Brien Assignee: Martin Bligh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Started at https://github.com/mongodb/mongo/commit/955f62adbd320f1ef725572cf7b935880facab7e

Here's a test to reproduce:

db.getSiblingDB("test").getCollection("test").insert({x:1})
before = db.adminCommand('top').totals['test.test'].writeLock
for(var i=0;i<1000;i++){
	db.getSiblingDB("test").getCollection("test").insert({x:i})
}
after = db.adminCommand('top').totals['test.test'].writeLock
 
assert.gt(after.count, before.count)
assert.gt(after.time, before.time)



 Comments   
Comment by Githook User [ 11/Nov/15 ]

Author:

{u'username': u'martinbligh', u'name': u'Martin Bligh', u'email': u'mbligh@mongodb.com'}

Message: SERVER-21276: Fix various issues with top
Branch: master
https://github.com/mongodb/mongo/commit/5dd9558ed687faa62037cd0f9774a7bd45c62b84

Comment by Martin Bligh [ 05/Nov/15 ]

Repro works well - thanks. Appears to be that we call Top::record with a lockType of -1 ... used to call it for the subOp from finishCurrentOp with a lockType of 1 explicitly. Will figure out a fix.

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