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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.1.8
    • Component/s: Sharding
    • None
    • Sharding
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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".

        1. sccc.js
          0.3 kB
          Randolph Tan

            Assignee:
            [DO NOT USE] Backlog - Sharding Team
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: