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

w parameter is not propagated correctly when calling getLastError on compatibility writeMode

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.6.0-rc2
    • 2.6.0-rc0
    • Sharding, Shell
    • Fully Compatible
    • ALL

    Description

      Send this commands through a shell connect to mongos:

      db.use.insert({x:1})
      db.runCommand({ getLastError: 1, w: 'adf' })

      results with writeMode commands/legacy:

      {
      	"n" : 0,
      	"errmsg" : "could not enforce write concern :: caused by :: BadValue cannot use non-majority 'w' mode adf when a host is not a member of a replica set",
      	"ok" : 0
      }

      results with compatibility:

      {
      	"n" : 0,
      	"shards" : [ ],
      	"shardRawGLE" : {
      		
      	},
      	"err" : null,
      	"ok" : 1
      }

      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: