Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6905

db.serverStatus() reporting incorrect number of operations

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.2.0
    • 2.0.6
    • Admin
    • None
    • prod
    • Linux

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: