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

Inserts with majority write concern timeout on WiredTiger replica sets where the number of non-arbiter nodes is less than a majority

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.8
    • Affects Version/s: 3.1.7
    • Component/s: Replication, Storage
    • Labels:
    • Fully Compatible
    • ALL
      1. Bring up a 3-node replica set where 2 of the nodes are arbiters
      2. Connect to the non-arbiter node
      3. Try to insert a document using a majority write concern and with a timeout
    • RPL 9 (09/18/15)

      This is happening in 3.1.7. This does not happen with 3.1.6.

      In the case of a 3-node replica set where all the nodes are running WiredTiger and 2 of the nodes are arbiters, an insert with writeConcern set to majority (and with a timeout) times out.

      This does not happen with MMAPv1

      $ mongo neurofunk.local:9001
      MongoDB shell version: 3.0.2
      connecting to: neurofunk.local:9001/test
      Server has startup warnings: 
      2015-09-03T18:01:27.776-0400 I CONTROL  [initandlisten] 
      2015-09-03T18:01:27.776-0400 I CONTROL  [initandlisten] ** NOTE: This is a development version (3.1.7) of MongoDB.
      2015-09-03T18:01:27.776-0400 I CONTROL  [initandlisten] **       Not recommended for production.
      2015-09-03T18:01:27.776-0400 I CONTROL  [initandlisten] 
      a:PRIMARY> use testDb
      switched to db testDb
      a:PRIMARY> db.testColl.insert({foo: "bar"}, {writeConcern: {w: "majority", wtimeout: 10000}})
      WriteResult({
      	"nInserted" : 1,
      	"writeConcernError" : {
      		"code" : 64,
      		"errInfo" : {
      			"wtimeout" : true
      		},
      		"errmsg" : "waiting for replication timed out"
      	}
      })
      a:PRIMARY> 
      

            Assignee:
            matt.dannenberg Matt Dannenberg
            Reporter:
            tim.olsen@mongodb.com Timothy Olsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: