[SERVER-6905] db.serverStatus() reporting incorrect number of operations Created: 30/Aug/12  Updated: 11/Jul/16  Resolved: 04/Sep/14

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 2.0.6
Fix Version/s: 2.2.0

Type: Bug Priority: Major - P3
Reporter: Kenny Gorman Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

prod


Operating System: Linux
Participants:

 Description   

looks like inserts are incrementing along with updates? Are you counting PK index updates perhaps?

mongos> db.serverStatus()
...
 
"opcounters" : {
		"insert" : 0,
		"query" : 0,
		"update" : 0,
		"delete" : 0,
		"getmore" : 0,
		"command" : 2334
	},
...
 
 
mongos> db.foo.insert({"_id":1})
mongos> db.foo.update({"_id":1}, {$set:{"foo":1}})
mongos> for (i=0; i<1000; i++){ db.foo.update({"_id":1}, {$set:{"foo":1}}) }
mongos> db.serverStatus()
...
 
"opcounters" : {
		"insert" : 1002,
		"query" : 0,
		"update" : 1001,
		"delete" : 0,
		"getmore" : 0,
		"command" : 2354
	},



 Comments   
Comment by Ramon Fernandez Marina [ 04/Sep/14 ]

This bug has been fixed for a long time, but looks like we forgot to close it so I'm doing that now.

Comment by Daniel Pasette (Inactive) [ 19/Sep/12 ]

Repro'd in 2.0.x, but not in 2.2.0
Not sure on backport yet.

Comment by Kenny Gorman [ 17/Sep/12 ]

ping

Comment by Kenny Gorman [ 10/Sep/12 ]

Yes:

MongoDB shell version: 2.0.6 via mongos

db.serverStatus()

"notSharded" : {
"insert" : 2003,
"query" : 11,
"update" : 2001,

for (i=0; i<1000; i++){ db.foo.update(

{"_id":1}

, {$set:{"foo":1}}) }

"notSharded" : {
"insert" : 3005,
"query" : 11,
"update" : 3001,

Comment by Eliot Horowitz (Inactive) [ 10/Sep/12 ]

This shouldn't exist in 2.0. Have you seen it there?

Comment by Kenny Gorman [ 10/Sep/12 ]

Do you guys plan to backport the fix to 2.0.x?

Comment by Ian Whalen (Inactive) [ 07/Sep/12 ]

Sorry, kennygorman - Ben has been out of office recently. I'm bouncing this to Tad to take a look.

Comment by Kenny Gorman [ 07/Sep/12 ]

Any thoughts?

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