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

uncaught exception in findAndModify when removing doc with _id turned off

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Write Ops
    • ALL

      probably minor bug..

      foo:PRIMARY> db.test.find()

      { "_id" : ObjectId("4d5d9381352dd47f2e62f58a"), "a" : 3 } { "_id" : ObjectId("4d5d9381352dd47f2f62f58a"), "a" : 3 } { "_id" : ObjectId("4d5d9381352dd47f3062f58a"), "a" : 3 } { "_id" : ObjectId("4d5d9381352dd47f3162f58a"), "a" : 3 } { "_id" : ObjectId("4d5d9381352dd47f3262f58a"), "a" : 3 } { "_id" : ObjectId("4d5d9381352dd47f3362f58a"), "a" : 3 } { "_id" : ObjectId("4d5d9381352dd47f3462f58a"), "a" : 3 } { "_id" : ObjectId("4d5d9381352dd47f3562f58a"), "a" : 3 } { "_id" : ObjectId("4d5d9381352dd47f3662f58a"), "a" : 3 }

      foo:PRIMARY> db.test.findAndModify({query:

      {a:3}

      , fields: {_id: 0, a: 1}, remove: true })
      Fri Feb 18 12:01:42 uncaught exception: findAndModifyFailed failed: "exception: assertion db/../bson/bsonobjbuilder.h:119"
      foo:PRIMARY> db.test.findAndModify({query:

      {a:3}

      , fields:

      {a: 1}

      , remove: true })

      { "_id" : ObjectId("4d5d9381352dd47f2f62f58a"), "a" : 3 }

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            antoine Antoine Girbal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: