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

TimeoutContext is missing in second commitTransaction

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 5.2.0
    • 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?

      If a ClientSession is already in the "transaction committed" state, drivers are required to re-run the previous commitTransaction if commitTransaction(); is called the second time. However, the second commitTransaction operation does not utilize the TimeoutContext because the first commitTransaction sets it to null.

      Expected Behavior: The subsequent commitTransaction should be executed with a TimeoutContext that has the timeout reset from the previous operation. 

      Actual Behavior: Currently, when the commitTransaction is re-run, it proceeds without any TimeoutContext, leading to breaking a CSOT guarantee.

      Acceptance criteria:

      • TimeoutContext is preserved for subsequent CommitTransaction operations.
      • Disabled tests with  
        //TODO JAVA-5425

        comment are enabled. 

            Assignee:
            slav.babanin@mongodb.com Slav Babanin
            Reporter:
            slav.babanin@mongodb.com Slav Babanin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: