[SERVER-17037] output of "top" command is zero on secondary running WT Created: 25/Jan/15  Updated: 18/Sep/15  Resolved: 26/Jan/15

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 3.0.0-rc6
Fix Version/s: 3.0.0-rc7

Type: Bug Priority: Critical - P2
Reporter: Michael O'Brien Assignee: Kaloian Manassiev
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   

first start a replset running wiredtiger

var x = new ReplSetTest({nodes:3})
x.startSet({storageEngine:"wiredTiger"})
x.initiate()

then put some load on the primary

while (1) { x.getPrimary().getDB('test').test.insert({}); }

compare the output of the top command on the primary and the secondary. the total time on the namespace being written to increases on the primary, but never changes on the secondary.

testReplSet:PRIMARY> before=db.runCommand("top").totals["test.test"].total.time; sleep(1000); after=db.runCommand("top").totals["test.test"].total.time;print(after-before)
170816
 
...
 
testReplSet:SECONDARY> before=db.runCommand("top").totals["test.test"].total.time; sleep(1000); after=db.runCommand("top").totals["test.test"].total.time;print(after-before)
0

it does behave correctly if you use mmapv1 instead though:

testReplSet:PRIMARY> before=db.runCommand("top").totals["test.test"].total.time; sleep(1000); after=db.runCommand("top").totals["test.test"].total.time;print(after-before)
135118
...
testReplSet:SECONDARY> before=db.runCommand("top").totals["test.test"].total.time; sleep(1000); after=db.runCommand("top").totals["test.test"].total.time;print(after-before)
75982



 Comments   
Comment by Githook User [ 27/Jan/15 ]

Author:

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

Message: SERVER-17037 syncApply should reset the current op in the beginning

(cherry picked from commit 084109075e885bb967addd0b7ed929791a4eaea6)
Branch: v3.0
https://github.com/mongodb/mongo/commit/248e24781ce255bc618f4af342e7ac6657547101

Comment by Githook User [ 26/Jan/15 ]

Author:

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

Message: SERVER-17037 syncApply should reset the current op in the beginning
Branch: master
https://github.com/mongodb/mongo/commit/084109075e885bb967addd0b7ed929791a4eaea6

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