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

ndeleted in system.profile documents reports 1 too few documents removed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.6.2, 2.7.0
    • Component/s: Diagnostics, Write Ops
    • Labels:
      None
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      Hide

      for (var i = 0; i < 1000; ++i) {db.rmtest.insert({_id:i, s:"s_"+(i%100)})}
      db.setProfilingLevel(2)
      db.rmtest.remove({s:"s_0"},true)
      db.rmtest.remove({s:"s_0"},false)
      db.rmtest.remove({s:"s_1"},{justOne:true})
      db.rmtest.remove({s:"s_1"},{justOne:false})
      db.rmtest.remove({s:"s_2"},{justOne:true, writeConcern:{w:"majority",j:true}})
      db.system.profile.find({ns:"test.rmtest"}).pretty()

      Show
      for ( var i = 0; i < 1000; ++i) {db.rmtest.insert({_id:i, s: "s_" +(i%100)})} db.setProfilingLevel(2) db.rmtest.remove({s: "s_0" }, true ) db.rmtest.remove({s: "s_0" }, false ) db.rmtest.remove({s: "s_1" },{justOne: true }) db.rmtest.remove({s: "s_1" },{justOne: false }) db.rmtest.remove({s: "s_2" },{justOne: true , writeConcern:{w: "majority" ,j: true }}) db.system.profile.find({ns: "test.rmtest" }).pretty()

      Description

      Documents in the system.profile collection for remove operations contain a ndeleted field set to nRemoved - 1.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: