-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
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.