-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
ALL
-
v7.0, v6.0, v5.0, v4.4
-
QO 2022-08-22, QO 2022-09-19, QO 2022-10-03, QE 2022-10-17
-
(copied to CRM)
-
162
Hi team,
User-visible impact as reported by the user (what is the user seeing):
The same aggregation with $merge works on a RS, but fails on a sharded cluster with error
MongoServerError: Command listIndexes does not support { readConcern: { level: "majority", provenance: "customDefault" } } :: caused by :: read concern not supported
MongoDB Version and Architecture:
Tested on v4.4.16 and v5.0.11 and v6.0.1
Steps to reproduce:
On a mongos, run the following:
use test db.adminCommand({ "setDefaultRWConcern": 1, "defaultReadConcern":{ level: "majority"}}) db.test.drop() db.test.insertOne({ a: 1 }) db.test.aggregate([{$merge:{ into: "coll2", on: "_id", whenMatched: "replace", whenNotMatched:"insert"}}]) // it doesn't matter whether the collection coll2 exists or not, the command fails with the same error
Expected:
The command should succeed
Actual result:
MongoServerError: Command listIndexes does not support { readConcern: { level: "majority", provenance: "customDefault" } } :: caused by :: read concern not supported
Note:
This issue does not happen on a RS.
The command would also succeed if the $merge stage only contains the collection name: {$merge:"coll2"}
Prioritized questions for the Server Team:
Please help confirm if this is a bug.
- related to
-
SERVER-47345 Fix causal consistency bug in $merge code on mongos
- Closed