[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:
Depends
depends on DRIVERS-1315 Set minWireVersion to 6 (MongoDB 3.6) Closed
Duplicate
is duplicated by CDRIVER-3936 Raise informative client side error w... Closed
is duplicated by CSHARP-3503 Raise informative client side error w... Closed
is duplicated by CXX-2210 Raise informative client side error w... Closed
is duplicated by GODRIVER-1932 Raise informative client side error w... Closed
is duplicated by JAVA-4084 Raise informative client side error w... Closed
is duplicated by NODE-3168 Raise informative client side error w... Closed
is duplicated by PHPC-1794 Raise informative client side error w... Closed
is duplicated by PYTHON-2618 Raise informative client side error w... Closed
is duplicated by RUBY-2563 Raise informative client side error w... Closed
is duplicated by RUST-715 Raise informative client side error w... Closed
Issue split
split to CDRIVER-3975 Provide informative handshake error m... Blocked
split to CSHARP-3636 Provide informative handshake error m... Blocked
split to CXX-2241 Provide informative handshake error m... Blocked
split to GODRIVER-1988 Provide informative handshake error m... Blocked
split to JAVA-4129 Provide informative handshake error m... Blocked
split to NODE-3250 Provide informative handshake error m... Blocked
split to PHPC-1824 Provide informative handshake error m... Blocked
split to PYTHON-2685 Provide informative handshake error m... Blocked
split to RUBY-2594 Provide informative handshake error m... Blocked
split to RUST-769 Provide informative handshake error m... Blocked
split to MOTOR-722 Provide informative handshake error m... Closed
Related
related to SERVER-56925 Remove requireApiVersion server param... Closed
Driver Changes: Needed
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-3975 Blocked
CXX-2241 Blocked
CSHARP-3636 Blocked
GODRIVER-1988 Blocked
JAVA-4129 Blocked
NODE-3250 Blocked
MOTOR-722 Duplicate
PYTHON-2685 Blocked
PHPC-1824 Blocked
RUBY-2594 Blocked
RUST-769 Blocked
SWIFT-1193 Won't Do

 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 SERVER-56925.

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:

  • No "hello" command available when using Versioned API
  • Using Versioned API and the maxServerVersion indicates that the server does not support the versioned API
  • Server is running with requireApiVersion but no Api Version was declared

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.

Generated at Thu Feb 08 08:23:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.