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

Increment opcounters for bulk insert

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.3, 2.1.0
    • Component/s: Querying
    • Labels:
      None
    • Operating System:
      ALL

      Description

      Currently we only increment opcounters for bulk insert if one of the inserts fails

      In [8]: db.command('serverStatus')['opcounters']['insert']
      Out[8]: 0

      In [9]: db.foo.insert([{}])
      Out[9]: [ObjectId('4e6e698f7b98300f2b000003')]

      In [10]: db.command('serverStatus')['opcounters']['insert']
      Out[10]: 1

      In [11]: db.foo.insert([{},{}])
      Out[11]: [ObjectId('4e6e699f7b98300f2b000004'), ObjectId('4e6e699f7b98300f2b000005')]

      In [12]: db.command('serverStatus')['opcounters']['insert']
      Out[12]: 1

      In [14]: db.foo.insert([

      {'_id':1}

      ,

      {'_id':1}

      ,

      {'_id':1}

      ])
      Out[14]: [1, 1, 1]

      In [15]: db.command('serverStatus')['opcounters']['insert']
      Out[15]: 2

        Attachments

          Activity

            People

            Assignee:
            redbeard0531 Mathias Stearn
            Reporter:
            redbeard0531 Mathias Stearn
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: