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

Mongo throws uncaught exception while perfoming findAndModify trying to return newly created document

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

      Windows 2008 Server 64

      When _id is compound object then and Mongo does actual insert :

      > db.coll.findAndModify({"query":

      { "_id.a": "default" }

      , "update": { "$inc":

      { "value": 1 }

      }, "new": true, "upsert": true })

      exception: assertion ../bson/bsonobjbuilder.h:119", but the document is created

      Then when we repeat the operation it results with proper document, and "value" is incremented.

      When _id is simple type everything is ok: Mongo returns document

      Again, clean database and we issue then same command but "new":false everything seems fine.

            Assignee:
            scotthernandez Scott Hernandez (Inactive)
            Reporter:
            rozacki@gmail.com chris rozacki
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: