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

mongoc_client_session_start_transaction should error if server selection fails

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.15.0
    • Component/s: libmongoc
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: