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

mongoc_client_session_start_transaction should error if server selection fails

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.15.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      Server selection was introduced into mongoc_client_session_start_transaction for CDRIVER-3067 and CDRIVER-3161; however, neither patch considered the case where server selection might fail. If so, it looks like we'd attempt to access the property of a null pointer.

      I propose adding a check and returning an error if a primary (or mongos node) could not be selected.

            Assignee:
            clyde.bazile@mongodb.com Clyde Bazile III (Inactive)
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: