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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.4
    • Affects Version/s: None
    • Component/s: Internal Code, Write Ops
    • Labels:
      None
    • ALL

      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
      

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

              Created:
              Updated:
              Resolved: