[SERVER-22770] Majority writes against the CSRS config server should check the write concern was satisfied Created: 19/Feb/16  Updated: 19/Feb/16  Resolved: 19/Feb/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.2.3, 3.3.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Sprint: Sharding 11 (03/11/16)
Participants:
Linked BF Score: 0

 Description   

Majority writes, which succeed doing the local write, but fail to wait for write concern will return 'ok: 1', but will contain a writeConcern section:

testReplSet:PRIMARY> db.runCommand({ insert: 'TestColl', documents: [ { Key: 3, Value: 'Value 3' } ], writeConcern: { w: 'majority', wtimeout: 2000 } });
{
        "ok" : 1,
        "n" : 1,
        "opTime" : {
                "ts" : Timestamp(1455914253, 1),
                "t" : NumberLong(4)
        },
        "electionId" : ObjectId("7fffffff0000000000000004"),
        "writeConcernError" : {
                "code" : 64,
                "errInfo" : {
                        "wtimeout" : true
                },
                "errmsg" : "waiting for replication timed out"
        }
}

The sharding registry write commands should check for write concern failure and retry if necessary.



 Comments   
Comment by Kaloian Manassiev [ 19/Feb/16 ]

After code inspection we have verified that all catalog writes in fact explicitly check for write concern errors (see BatchedCommandResponse::toStatus()).

Generated at Thu Feb 08 04:01:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.