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

Assertion error in findAndModify

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

      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@mongodb.com Mathias Stearn
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: