Blacklist on mongos commands that do not support readConcern level:snapshot

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.7.4
    • Affects Version/s: None
    • Component/s: Sharding
    • Fully Compatible
    • Sharding 2018-03-12, Sharding 2018-03-26, Sharding 2018-04-09
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

            Assignee:
            Misha Tyulenev (Inactive)
            Reporter:
            Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: