Make ReadConcern configurable

Description

Currently, PBM requires enableReadConcernMajority=true in MongoDB, otherwise it won't start and return "ReadConcernMajorityNotEnabled" error. As discussed with we may revisit this requirement as:

  1. There are not transactions as part of agents' operation

  2. Mongo guarantees "read your own writes" on single documents without this concern.

 

To be evaluated.

Environment

None

AFFECTED CS IDs

CS0044243

Activity

Show:

Michal Nosek April 4, 2024 at 8:23 PM

Thank you for the investigation. Given all that you mentioned, I am not sure anymore if it makes sense to implement it. I would defer to as it was requested by one of his major customers, not sure if it’s a valid request anymore. Santo, would you advise here, please?

Boris Ilijic February 14, 2024 at 9:06 AM

Hi ,

The team has agreed that it should be possible to make Read Concern more flexible by not demanding 'majority' read concern for all operations.

But before I implement that, I'd like to discuss some more details from this ticket.

You explicitly asked for disabling 'majority read concern' using the enableMajorityReadConcern option/configuration parameter. From the MongoDB 5.0 version, that concrete option is no longer configurable. So, it is by default enabled and cannot be changed by specifying mongod option or config parameter. Please see the details here:

https://www.mongodb.com/docs/manual/release-notes/5.0-compatibility/#enablemajorityreadconcern-is-not-configurable

In addition, MongoDB 4.4 (the last version where that option was available) goes EOL this month (February 2024).

The question is, do we have clients who use MongoDB 4.x and explicitly need to disable majority read concern using that option (--enableMajorityReadConcern=false) for some reason? If yes, please describe their use case more.

 

Fyi, the way we see that setting can be provided to PBM is by supplying the standard 'readConcernLevel' param on the connection string level. Example:

PBM_MONGODB_URI="mongodb://pbmuser:secretpwd@localhost:27017/?authSource=admin&readConcernLevel=local").

That approach will also work for MongoDB 4.x ver. If you see any issue with that approach, please share it.

 

Thanks for your feedback in advance.

Aaditya Dubey July 28, 2023 at 4:43 PM

Hi ,

Thank you for the report and feedback.

Done

Details

Assignee

Reporter

Needs QA

Yes

Needs Doc

Yes

Sprint

Fix versions

Priority

Smart Checklist

Created July 21, 2023 at 10:29 AM
Updated May 16, 2024 at 1:35 PM
Resolved May 14, 2024 at 10:30 AM