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

Fix connection pool race condition

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.11.0
    • None
    • Connection Management
    • None

    Description

      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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: