Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4502

libmongoc expects connectionId in hello response to be int32

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Blocker - P1 Blocker - P1
    • 1.22.2, 1.23.1
    • Affects Version/s: 1.22.0
    • Component/s: None
    • Labels:
      None

      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.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            andreas.braun@mongodb.com Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: