[DRIVERS-1619] Provide informative handshake error message when Versioned API requested from downlevel server Created: 19/Mar/21 Updated: 30/Apr/22 |
|
| Status: | Backlog |
| Project: | Drivers |
| Component/s: | Stable API |
| Fix Version/s: | None |
| Type: | Epic | Priority: | Major - P3 |
| Reporter: | James Kovacs | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Changes: | Needed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Driver Compliance: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
If Versioned API is requested by the client, the driver will use the hello command for both initial handshake and heartbeats becuase only hello is included in API version 1, not isMaster. Downlevel versions of MongoDB will respond with no such command: 'hello', which doesn't immediately indicate to users that they're requesting Versioned API from a server that doesn't support it. If a driver requests Versioned API and the initial handshake fails, we should provide a helpful error message that includes the text "Ensure that your server supports Versioned API." |
| Comments |
| Comment by PM Bot [ 19/Jan/22 ] |
|
If you are not logged in, you can view the tickets in this epic by following this link. |
| Comment by Andreas Braun [ 19/May/21 ] |
|
Yes, this is not only related to requireApiVersion, but the Versioned API in general. Either way, the biggest pain point was for serverless customers where the usual way of configuring the driver through the connection string doesn't work. Since serverless doesn't use requireApiVersion anymore, there is one fewer reason to do this, which means we might not have (or want) to do this before 5.0, freeing up time for other work. I'm putting it back into "Needs triage" to discuss. |
| Comment by A. Jesse Jiryu Davis [ 18/May/21 ] |
|
This ticket isn't needed now, after |
| Comment by A. Jesse Jiryu Davis [ 07/May/21 ] |
|
We'll have a meeting in the next 2 weeks to decide whether to remove the requireApiVersion server flag, since we're not using it ourselves. Let's avoid too much work on this until we've decided. |
| Comment by Ian Whalen (Inactive) [ 07/May/21 ] |
|
Adding this into INIT-1 given the importance of this for the user experience as a part of adding a versioned api. |
| Comment by Andreas Braun [ 27/Apr/21 ] |
|
After discussion with durran.jordan, we've decided that the SDAM, Server Selection, and SDAM monitoring specs need to be changed. The SDAM spec needs to introduce a new server type "Errored", which indicates that while the handshake/heartbeat completed successfully but yielded an unexpected result (e.g. using Versioned API but "hello" command not found error). The list of such errors is:
Server Selection is changed to fail fast if any server in the topology is marked as "Errored". The error message should indicate that this is not a selection failure, but that the topology the driver sees is not suitable for server selection (e.g. because of mixed Versioned API requirements). The SDAM monitoring spec introduces a new event when the heartbeat results in a server transitioning to the "Errored" type. The heartbeatFailed event is changed to no longer be used when the handshake/heartbeat results in an {ok: 0}response. Similarly, an {ok: 1}response does not always trigger a heartbeatSucceeded event, see example 2 in the list above. Moving back to "Needs Triage" so we can discuss. |
| Comment by Alexander Golin (Inactive) [ 22/Mar/21 ] |
|
Triage: Andreas to investigate. |