Make ReadConcern configurable
Description
Environment
AFFECTED CS IDs
Activity
Michal Nosek April 4, 2024 at 8:23 PM
@Boris Ilijic 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 @Santo Leto 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 @Michal Nosek ,
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:
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 @Michal Nosek,
Thank you for the report and feedback.
Details
Assignee
Boris IlijicBoris IlijicReporter
Michal NosekMichal NosekLabels
Needs QA
YesNeeds Doc
YesSprint
NoneFix versions
Priority
Low
Details
Details
Assignee
Reporter
Labels
Needs QA
Needs Doc
Sprint
Fix versions
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist
Open Smart Checklist
Smart Checklist

Currently, PBM requires enableReadConcernMajority=true in MongoDB, otherwise it won't start and return "ReadConcernMajorityNotEnabled" error. As discussed with @andrew.pogrebnoi we may revisit this requirement as:
There are not transactions as part of agents' operation
Mongo guarantees "read your own writes" on single documents without this concern.
To be evaluated.