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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.6.0-rc2
    • Affects Version/s: 2.6.0-rc0
    • Component/s: Sharding, Shell
    • Fully Compatible
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
      }
      

              Assignee:
              Randolph Tan
              Reporter:
              Randolph Tan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: