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

Fix handling of protocol version on reconnect in DBClient

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.3
    • Component/s: Internal Client
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Repl 2019-11-18, Repl 2019-12-02

      Description

      We currently temporarily switch the client to "kOpQueryOnly" protocol when we connect, to force the OP_QUERY protocol to be used. After connecting, we switch our view of what the server accepts to match the wire protocol version in the server, which for all modern versions of mongodb is "kOpMsgOnly". When we reconnect, then, we attempt to do an isMaster command with a "kOpQueryOnly" client and what we believe is a "kOpMsgOnly" server; this fails.

      If on each connection we also reset our view of what the server is to the default "kOpQueryOnly", we will get the same result (the first isMaster is done with OP_QUERY, later operations with whatever the server replies in the isMaster), and reconnection will work.

        Attachments

          Activity

            People

            Assignee:
            matthew.russotto Matthew Russotto
            Reporter:
            matthew.russotto Matthew Russotto
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: