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

Fix handling of protocol version on reconnect in DBClient

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.3
    • Affects Version/s: None
    • Component/s: Internal Client
    • None
    • Fully Compatible
    • ALL
    • Repl 2019-11-18, Repl 2019-12-02

      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.

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

              Created:
              Updated:
              Resolved: