readConcern: {level: "snapshot"}
|
have different support on mongod and mongos. e.g mongos supports only read commands, while mongod supports CRUD
The task objective is to blacklist all but supported commands on mongos and add validating tests.
suggested implementation:
add a public method to the Command class
|
virtual bool supportsReadConcernMongos(const std::string& dbName,
|
const BSONObj& cmdObj,
|
repl::ReadConcernLevel level) const {
|
return level == repl::ReadConcernLevel::kLocalReadConcern;
|
}
|
Currently its planned to be called in the beginning of the command path on mongos instead those lines
https://github.com/mongodb/mongo/blob/master/src/mongo/s/commands/strategy.cpp#L221-L227
|