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

Fix race conditions in Timeout logic

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Java Drivers
    • 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?

      A race condition might occur when Timeout.hasExpired() is checked in an if statement, and immediately after Timeout.remaining() is called which might return 0.

      One example: TimeoutContext.java#L257

      Acceptance Criteria:
      The CSOT code must be modified to eliminate the possibility of race conditions related to the usage of Timeout.hasExpired() and Timeout.remaining().

            Assignee:
            maxim.katcharov@mongodb.com Maxim Katcharov
            Reporter:
            slav.babanin@mongodb.com Slav Babanin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: