[SERVER-33708] Blacklist on mongos commands that do not support readConcern level:snapshot Created: 06/Mar/18  Updated: 29/Oct/23  Resolved: 22/Mar/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Task Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Misha Tyulenev
Resolution: Fixed Votes: 0
Labels: todo_in_code
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-03-12, Sharding 2018-03-26, Sharding 2018-04-09
Participants:

 Description   

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


Generated at Thu Feb 08 04:34:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.