db.serverStatus() reporting incorrect number of operations

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.2.0
    • Affects Version/s: 2.0.6
    • Component/s: Admin
    • None
    • Environment:
      prod
    • Linux
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
      	},
      

              Assignee:
              Unassigned
              Reporter:
              Kenny Gorman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: