[DOCS-6561] ReadConcern: Majority undefined with replication PV0 Created: 09/Nov/15  Updated: 24/Feb/16  Resolved: 17/Dec/15

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Critical - P2
Reporter: Osmar Olivo Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DOCS-6624 3.2 readConcern Closed
Participants:
Days since reply: 8 years, 8 weeks, 6 days ago

 Description   

After some discussion, we've decided to make readConcern: Majority's behavior be undefined when using protocolVersion 0. At some point in the future we will explicitly have readConcern:Majority reads throw errors when using Protocol Version 0, but for now the behaviour is undefined and provides no guarantees.

We should recommend always using ProtocolVersion 1 when using readConcerns: Majorioty.

Can we make sure this gets reflected in the docs?



 Comments   
Comment by Githook User [ 17/Dec/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-6561 readConcern majority and repl protocolVersion
Branch: master
https://github.com/mongodb/docs/commit/df48567c6a11960cfd1d22f4f117e7b1dd48b8f2

Comment by Andy Schwerin [ 15/Dec/15 ]

Let's not change "written" to "made durable" just yet.

Comment by Osmar Olivo [ 15/Dec/15 ]

Ultimately, it does give an error if you try to use Read Concern Majority with pv0. You will get a NotEnabled error and the message is "Replica sets running protocol version 0 do not support readConcern: majority". This went out with 3.2.0.

Let's make sure this get's documented appropriately.

Also, the definition for readConcern: Majority is currently "The query will return the node’s most recent copy of the data confirmed as having been written to a majority of the nodes." I think since it's only supported in pv1 it's safe to replace the word "written", with "made durable".

Comment by Andy Schwerin [ 20/Nov/15 ]

I think SERVER-21362 will be reverted, and that it's very likely that majority read concern will have undefined behavior in PV0. We might be able to go one step better, and actually have it error out. Still looking. There are latency impacts to waiting for journaling that make me reluctant to do it in PV0, at least in 3.2.0. See SERVER-21581.

Comment by Osmar Olivo [ 19/Nov/15 ]

let's slowdown everyone, this decision may have ended up being changed. milkie schwerin I believe we may have decided to support readConcern: Majority on PV0 after all with the changes in SERVER-21362. milkie please confirm what we should document here.

If no changes are needed let's close this ticket.

Thanks.

Comment by A. Jesse Jiryu Davis [ 19/Nov/15 ]

Drivers must all throw errors if the user sets a read concern and the server does not support it:

https://github.com/mongodb/specifications/blob/master/source/read-write-concern/read-write-concern.rst#errors-1

Also, let's be careful to distinguish wire protocol version and replication protocol version, I was confused when I first read this. Drivers send readConcern to servers with wire protocol version 4. I believe that a server must, additionally, be using replication protocol version 1 to support readConcernLevel majority.

Generated at Thu Feb 08 07:52:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.