Details
-
Improvement
-
Resolution: Community Answered
-
Major - P3
-
None
-
4.2.3
-
None
-
Server Triage
-
Fully Compatible
Description
In thisĀ change stream post, the read concern majority option can be disabled in v4.2. So I try to use "read concern=local" to build the change stream in golang but failed:
(InvalidOptions) $changeStream cannot run with a readConcern other than 'majority', or in a multi-document transaction. Current readConcern: { readConcern: { level: "local" } } |
Here is the mongodb source code in document_source_change_stream.h
void assertSupportsReadConcern(const repl::ReadConcernArgs& readConcern) const { |
// Only "majority" is allowed for change streams. |
uassert(ErrorCodes::InvalidOptions,
|
str::stream() << "$changeStream cannot run with a readConcern other than " |
<< "'majority', or in a multi-document transaction. Current " |
"readConcern: " |
<< readConcern.toString(),
|
!readConcern.hasLevel() ||
|
readConcern.getLevel() == repl::ReadConcernLevel::kMajorityReadConcern);
|
}
|
It looks like the majority read concern is not disabled.