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

gle returns wrong result after bulk api in legacy write path

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Shell
    • None
    • ALL

    Description

      > db.user.insert({ x: 1 })
      WriteResult({ "nInserted" : 1 })
      > db.user.update({ x: 1 }, { $inc: { x: 1 }})
      WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 0 })
      > db.runCommand({ getLastError: 1 })
      {
      	"connectionId" : 2,
      	"n" : 0,
      	"syncMillis" : 0,
      	"writtenTo" : null,
      	"err" : null,
      	"ok" : 1
      }
      

      Reason is because bulk api calls resetError after executing the bulk ops.

      Attachments

        Activity

          People

            randolph@mongodb.com Randolph Tan
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: