[SERVER-20287] Inserts with majority write concern timeout on WiredTiger replica sets where the number of non-arbiter nodes is less than a majority Created: 03/Sep/15  Updated: 19/Sep/15  Resolved: 04/Sep/15

Status: Closed
Project: Core Server
Component/s: Replication, Storage
Affects Version/s: 3.1.7
Fix Version/s: 3.1.8

Type: Bug Priority: Major - P3
Reporter: Timothy Olsen (Inactive) Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: mms-s
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
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)
Participants:

 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> 



 Comments   
Comment by Githook User [ 04/Sep/15 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-20287 make write/readConcern majority use writeMajority rather than votingMajority
Branch: master
https://github.com/mongodb/mongo/commit/5048f4a8fc24ee4b0eed4f3b3ab3d019d2aa00e1

Generated at Thu Feb 08 03:53:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.