Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-33708

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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.7.4
    • None
    • Sharding
    • Fully Compatible
    • Sharding 2018-03-12, Sharding 2018-03-26, Sharding 2018-04-09

    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

      Attachments

        Activity

          People

            misha.tyulenev@mongodb.com Misha Tyulenev
            misha.tyulenev@mongodb.com Misha Tyulenev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: