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

Fix handling of protocol version on reconnect in DBClient

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.3.3
    • Internal Client
    • None
    • Fully Compatible
    • ALL
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: