Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-14853

IllegalTransactionStateException due to trying to rollback a transaction that has already been rolled back.

    XMLWordPrintable

Details

    Description

      This is due to the following code in TransactionInvocation:

      // If you try to commit a transaction that is marked for rollback, you'll get an UnexpectedRollbackException
              if (transactionStatus.isCompleted())
              {
                  log.error("Action " + getDetails(actionInvocation) + " is already completed and can not be committed again.");
              }
              if (transactionStatus.isRollbackOnly())
              {
                  if (log.isDebugEnabled())
                      log.debug("Transaction status for action " + getDetails(actionInvocation) + " set to rollback only. Invoking rollback()");
      
                  transactionManager.rollback(transactionStatus);
              }
              else
              {
                  if (log.isDebugEnabled())
                      log.debug("Committing transaction for action " + getDetails(actionInvocation));
      
                  transactionManager.commit(transactionStatus);
              }
      

      You can't roll back a transaction twice; this code should bail out if the transaction is complete (we might want to leave the log message in there).

      Attachments

        Issue Links

          Activity

            People

              don.willis@atlassian.com Don Willis
              alynch Andrew Lynch (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: