This is the root cause for the issue identified in CDRIVER-4499. mongoc_server_description_handle_hello checks the type for the connectionId field and fails if it's not an int64. Despite the command monitoring spec specifying the field as int32, both the server's IDL for hello and mongohoused's response declare the field as int64. While this number is unlikely to exceed the 32-bit range, mongohoused always returns an int64 even when the number would fit in an int32. Given this, libmongoc should accept both int32 and int64 responses, while also ensuring that 64-bit values are handled accordingly (either by failing with an error message or by truncating the connection id so it fits in an int32.
This was introduced by CDRIVER-4085 in 1.22.0, so a backport to 1.22 would be much appreciated.
- is depended on by
-
PHPLIB-1023 Atlas Data Lake tests fail due to libmongoc not handling 64-bit value for connection ID
- Closed
- is related to
-
CDRIVER-4499 mongoc_server_description_handle_hello does not always set error when hello response is malformed
- Closed
-
CDRIVER-4085 Add server connectionId to command monitoring events
- Closed
- related to
-
CDRIVER-4593 C Driver fails to validate double type connectionId during handshake process
- Closed
-
DRIVERS-2503 ConnectionId returned in heartbeats may be int64
- Implementing
-
PHPC-2157 Upgrade libmongoc to 1.22.2
- Closed
-
CDRIVER-4557 ConnectionId returned in heartbeats may be int64
- Closed
- links to