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

opcounters after write commands in mongos not correctly updated

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.6.0-rc0
    • None
    • Write Ops
    • None
    • ALL

    Description

      When using write commands through mongos, opCounters are not correctly updated - currently (insert) opCounters are updated on the legacy write path only.

      We should update opCounters in the cluster_write_cmd.cpp itself.

      mongos> db.serverStatus().opcounters
      {
         "insert" : 0,
         "query" : 9,
         "update" : 0,
         "delete" : 0,
         "getmore" : 0,
         "command" : 20
      }
      mongos> db.foo.insert({})
      SingleWriteResult({
         "writeErrors" : [ ],
         "writeConcernErrors" : [ ],
         "nInserted" : 1,
         "nUpserted" : 0,
         "nUpdated" : 0,
         "nModified" : 0,
         "nRemoved" : 0,
         "upserted" : [ ]
      })
      mongos> db.serverStatus().opcounters
      {
         "insert" : 0,
         "query" : 9,
         "update" : 0,
         "delete" : 0,
         "getmore" : 0,
         "command" : 25
      }

      Attachments

        Activity

          People

            siyuan.zhou@mongodb.com Siyuan Zhou
            greg_10gen Greg Studer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: