forked from apache/jena
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use java.lang.Error when unexpected condition occurs during rollback.
- Loading branch information
Showing
2 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -747,8 +747,9 @@ private void executeCommitWriter(Transaction transaction, Runnable commit, Runna | |
throw new TransactionException("Exception during 'commit' - transaction rollback.", ex); | ||
} | ||
// Very bad. (This have been dealt with already and should get to here.) | ||
SysErr.error("Transaction rollback failed. System unstable."); | ||
throw new TransactionException("Exception during 'rollback' - System unstable.", ex); | ||
SysErr.error("Transaction rollback failed. System unstable."+ | ||
"\nPlease contact [email protected], giving details of the environment and this incident."); | ||
throw new Error("Exception during 'rollback' - System unstable.", ex); | ||
} | ||
catch (Throwable ex) { | ||
SysErr.warn("Unexpected Throwable during 'commit' : transaction may have committed. Attempting rollback: ",ex); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,8 +219,9 @@ private void writerPrepareCommit() { | |
throw new TDBTransactionException("Exception during 'commit' - transaction rollback.", ex); | ||
} | ||
// Very bad. (This should not happen and have been dealt with already.) | ||
SystemTDB.errlog.error("Transaction rollback failed. System unstable."); | ||
throw new TDBTransactionException("Exception during 'rollback' - System unstable.", ex); | ||
SystemTDB.errlog.error("Transaction rollback failed. System unstable."+ | ||
"\nPlease contact [email protected], giving details of the environment and this incident."); | ||
throw new Error("Exception during 'rollback' - System unstable.", ex); | ||
} | ||
catch (Throwable ex) { | ||
SystemTDB.errlog.warn("Unexpected Throwable during 'commit' : transaction may have committed. Attempting rollback: ",ex); | ||
|
@@ -302,7 +303,7 @@ public void abort() { | |
case WRITE : | ||
if ( state != TxnState.ACTIVE ) | ||
throw new TDBTransactionException("Transaction has already committed or aborted"); | ||
// Application abort. Didn't startwriing to the journal. | ||
// Application abort. Didn't start writing to the journal. | ||
rollback(); | ||
break; | ||
} | ||
|