Config servers incorrectly allow w:1 writes if no write concern is specified

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding
    • ALL
    • Sharding 18 (08/05/16)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-20891 tried to enforce that all writes to the config server use w:majority write concern. It, however, neglects to check the case where no write concern is specified at all. Thus you get the following behavior when writing to a config server:

      > db.foo.insert({a:1}, {writeConcern: {w:1}})
      WriteResult({
      	"writeError" : {
      		"code" : 2,
      		"errmsg" : "w: 'majority' is the only valid write concern when writing to config server replica sets, got: { w: 1, wtimeout: 0 }"
      	}
      })
      > db.foo.insert({a:1})
      WriteResult({ "nInserted" : 1 })
      

              Assignee:
              [DO NOT USE] Backlog - Sharding Team
              Reporter:
              Spencer Brody (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: