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

XMLWordPrintableJSON

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

      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:
              Scott Hernandez (Inactive)
              Reporter:
              chris rozacki
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: