Uploaded image for project: 'Phoenix Tephra'
  1. Phoenix Tephra
  2. TEPHRA-279

If getTransactionAwareName() throws an exception, abort() does not happen

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.13.0-incubating
    • None
    • core
    • None

    Description

      The problem is here in TransactionContext:

        private void checkForConflicts() throws TransactionFailureException {
          Collection<byte[]> changes = Lists.newArrayList();
          for (TransactionAware txAware : txAwares) {
            try {
              changes.addAll(txAware.getTxChanges());
            } catch (Throwable e) {
              // ---- PROBLEM: if getTransactionAwareName() throws, abprt() is not called!
              String message = String.format("Unable to retrieve changes from transaction-aware '%s' for transaction %d. ",
                                             txAware.getTransactionAwareName(), currentTx.getTransactionId());
              LOG.warn(message, e);
              abort(new TransactionFailureException(message, e));
              // abort will throw that exception
            }
          }
      

      We could consider such a transaction-aware ill-behaved, but we should still make sure the transaction semantics remain correct.

      Attachments

        Issue Links

          Activity

            People

              anew Andreas Neumann
              anew Andreas Neumann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: