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

Fix connection pool race condition

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.11.0
    • Affects Version/s: None
    • Component/s: Connection Management
    • Labels:
      None

      There is a race condition in the DefaultConnectionPool class between the maintenance task thread and the constructor for the class. The race can be fixed by deferring starting the maintenance task thread to a start method that's called immediately after the constructor completes, which will ensure that all final fields of the class are published (in the JVM memory model sense of the word)

            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: