Assertion error in findAndModify

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.7.1
    • Affects Version/s: 1.6.2
    • Component/s: Querying
    • None
    • Environment:
      Linux 64
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      On empty DB, I'm trying to ensure that I insert exactly one record like this:

      { short_code: 1 }

      ... and that concurrent processes doing the same thing will instead increment the short_code.

      > db.runCommand({findAndModify: 'short_code', upsert: true, update: { $inc:

      { short_code: 1 }

      }, query:

      { short_code: true }

      , new: true })
      {
      "errmsg" : "exception: assertion db/../util/../util/../db/../bson/bsonobjbuilder.h:115",
      "code" : 0,
      "ok" : 0
      }

            Assignee:
            Mathias Stearn
            Reporter:
            A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: