[SERVER-77154] Change server's internal client implementations to always use "hello" rather than "isMaster" for the connection handshake Created: 15/May/23 Updated: 29/Oct/23 Resolved: 05/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0, 6.0.7, 7.0.0-rc3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v7.0, v6.0
|
||||||||||||||||||||||||
| Sprint: | QE 2023-05-29, QE 2023-06-12 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
The "hello" command was introduced in 5.0 and was intended as a replacement for the "isMaster" command. However, drivers still issue the initial connection handshake using an OP_QUERY isMaster command in some circumstances order to ensure that they can communicate with older servers. This is discussed in this section of the drivers' connection handshake specification: The server's implementation of the client, however, does not need to connect to old server versions that do not support "hello" or OP_MSG. The server codebase's client implementations are also used inside the legacy mongo shell. The mongo shell became an internal test-only tool starting in 6.0, and therefore it also does not have to remain compatible with servers before 5.0 that either don't support "hello" or OP_MSG. For these reasons, it should be safe to make the AsyncDBClient and DBClientConnection always use "hello" rather than "isMaster". Looking at the code, the AsyncDBClient always uses "isMaster" and can be changed to always use "hello" instead. The DBClientConnection uses "hello" if an API version is set but should change to use "hello" unconditionally. |
| Comments |
| Comment by Githook User [ 08/Jun/23 ] |
|
Author: {'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}Message: (cherry picked from commit a8f33f8888f76f07e01edec9b0ba90a8a336e6ae) |
| Comment by Githook User [ 06/Jun/23 ] |
|
Author: {'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}Message: (cherry picked from commit 379a9256c85ce6871fbe1792bd578d8dbd06a065) |
| Comment by Githook User [ 05/Jun/23 ] |
|
Author: {'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}Message: |