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

Commands to mongos against SCCC config server results in all servers down

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 3.1.8
    • Sharding
    • None
    • Sharding
    • ALL

    Description

      if the command has a read preference setting even if they are all up.

      Attached sccc.js that demonstrates this issue.

      The problem appears to be coming from the _lockType helper:

      https://github.com/mongodb/mongo/blob/r3.1.9/src/mongo/client/syncclusterconnection.cpp#L621

      where it tries to determine if the command is a write-type command. It does this by getting the name of the command and appending the help: 1 field.

      The problem comes in when there is a read preference setting and triggers the ServerSelectionMetadata::downconvert code here:

      https://github.com/mongodb/mongo/blob/r3.1.9/src/mongo/client/syncclusterconnection.cpp#L253

      This will result in the command being wrapped around the 'query' field; causing the _lockType helper to run the "query" command and fail. The command will fail on all 3 config servers and will ultimately make mongos return the error "all servers down/unreachable when querying".

      Attachments

        1. sccc.js
          0.3 kB

        Activity

          People

            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: