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

Race condition on server description access

      Testing has uncovered a race condition, mostly affecting retryable reads and writes, in which the ServerDescription in DefaultServer does not reflect the current state of the ClusterDescription. This server description is used to make decisions on whether to retry the operation, and as a result can make the wrong decision.

      Specifically, the ServerDescription is in the CONNECTING state even after a successful selection of that server. There are a couple of ways we might fix it:

      1. Find and fix the race condition
      2. Make all decisions based on the ConnectionDescription. Stop tracking ServerDescription independently in DefaultServer
      3. Cache the ServerDescription from the ClusterDescription at the time the server was selected

            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: