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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.6.2, 2.7.0
    • Affects Version/s: 2.6.0
    • Component/s: Diagnostics, Write Ops
    • None
    • ALL
    • 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()

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

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            norman.graham@mongodb.com Norman Graham (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: