Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-5186

Change server pinning implementation to not rely on Cluster#getDescription

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.11.0
    • Affects Version/s: None
    • Component/s: Internal
    • None
    • Fully Compatible
    • 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?

      The current implementation of server address pinning for transactions on sharded and load-balanced clusters relies on the Cluster#getDescription method. This means that blocking has to be done twice instead of just once via Cluster#selectServer. It would be easy to refactor so that the cluster type (which is all that is needed) is derived instead from the ConnectionSource after it's selected.

      This would simplify the code, allow the removal of Cluster#getDescription, and make server selection timeout logging and exception message more consistent.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: