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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.1.7
    • Fix Version/s: 3.1.8
    • Component/s: Replication, Storage
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      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
    • Sprint:
      RPL 9 (09/18/15)

      Description

      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> 
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: