[SERVER-44455] Fix handling of protocol version on reconnect in DBClient Created: 06/Nov/19 Updated: 29/Oct/23 Resolved: 26/Nov/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthew Russotto | Assignee: | Matthew Russotto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Repl 2019-11-18, Repl 2019-12-02 |
| Participants: |
| 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. |
| Comments |
| Comment by Githook User [ 07/Nov/19 ] |
|
Author: {'username': 'mtrussotto', 'email': 'matthew.russotto@mongodb.com', 'name': 'Matthew Russotto'}Message: |