Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1437

Driver does not send endSessions on client shutdown

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Per the sessions spec the driver is required to send an endSessions command on client shutdown. However, we do not appear to currently do this.

      https://github.com/mongodb/specifications/blob/master/source/sessions/driver-sessions.rst#endsessions

      Note that in our fix for this we should try to avoid issues like those described in NODE-4429 and JAVA-2859 where if a server is unavailable client shutdown hangs for 30 seconds until getting a server selection timeout error. Both Java and Node solve this by checking the topology first to see if there are any servers available matching a primaryPreferred read preference, and only attempting the command if such a server exists.

      See: https://github.com/mongodb/node-mongodb-native/commit/5086eadf52e13369f584b9bd64477ab7f3522ff6 and https://github.com/mongodb/mongo-java-driver/commit/15210a62e9488b115b1be5f16c30b63bb2a3ef2c

      Also, note that once we fix this bug we will need to sync the CMAP logging test change made in https://github.com/mongodb/specifications/pull/1374.

            Assignee:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: