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

New (batch) write ops return ok:<bool>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.5.4
    • Internal Code, Write Ops
    • None
    • ALL

    Description

      The new batch write ops do not return the same ok type as normal commands.

      > db.t.runCommand("update", {updates:[{q:{}, u:{$inc:{v:1}}}], writeConcern:{}, continueOnError:false})
      { "ok" : true, "n" : NumberLong(0), "upserted" : NumberLong(0) }
      > db.getLastErrorObj()
      { ...   "err" : null, "ok" : 1 }
      > db.runCommand("dbStats").ok
      1
      > db.runCommand("collStats")
      { "ok" : 0, "errmsg" : "ns not found" }
      > db.t.runCommand("update", {updates:[{q:{}, u:{$inc:{v:1}}}]}).ok
      false

      Attachments

        Issue Links

          Activity

            People

              alerner Alberto Lerner
              scotthernandez Scott Hernandez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: