Add TransactionState.STARTING

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Transactions
    • None
    • Java Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Functionally the transactions code follows the desire of the Spec.

      However, likely due to it being a POC for the Spec it appears to deviate from it. This is because it implicitly follows the transcation stages:

      ClientSession is in one of five states: "no transaction", "starting transaction", "transaction in progress", "transaction committed", and "transaction aborted".

      There is no TransactionState.STARTING value as startTransaction uses TransactionState.IN. The Java driver uses a boolean flag messageSentInCurrentTransaction that indicates what the spec considers the change between "starting transaction -> "transaction in progress".

      As this deviates from the Spec and obsfucates if the code follows the Specification or not. Its recommended to make this state change explicit for the benefit of future maintainers.

      Addressing the source code notes tagged with TODO-JAVA-6126 is in scope of this ticket.

            Assignee:
            Unassigned
            Reporter:
            Ross Lawley
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: