[SERVER-20945] CSRS config servers require majority write concern even for local database Created: 15/Oct/15  Updated: 25/Jul/16  Resolved: 20/Oct/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.2.0-rc0
Fix Version/s: 3.2.0-rc1

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

Issue Links:
Duplicate
is duplicated by SERVER-25204 CSRS config servers require majority ... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:
  1. Bring up a CSRS replica set of config servers
  2. Try to write a document into a collection in the local database with a write concern of w: 1
Sprint: Sharding B (10/30/15)
Participants:

 Description   

CSRS config servers require majority write concern even for local database. For example:

csrs:PRIMARY> use local
switched to db local
csrs:PRIMARY> db.foo.insert({}, {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 }"
	}
})

Should an exception be made in terms of the required write concern for the local database?



 Comments   
Comment by Githook User [ 21/Oct/15 ]

Author:

{u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}

Message: SERVER-20945 do not require majority write concern for CSRS local db
Branch: master
https://github.com/mongodb/mongo/commit/2656a6b2dc87860fe11b0301b82858817e63ce5b

Comment by Timothy Olsen (Inactive) [ 16/Oct/15 ]

In particular, the writes being rejected on the local database with w:majority are upserts. I noticed that inserts do not get rejected.

Comment by Eric Milkie [ 16/Oct/15 ]

It also sounds like even if you do use w:majority, you still can't write to the local database, as it rejects using write concern on a non-primary.

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