if (isZombieTransaction(address)) {
return;
}
if (commitTimestamp == ABORTED) {
TransactionMapItem item = _abortedTransactionMap.get(key);
if (item == null) {
item = new TransactionMapItem(startTimestamp, address);
item.setCommitTimestamp(ABORTED);
_abortedTransactionMap.put(key, item);
} else {
throw new CorruptJournalException("Duplicate transaction abort records with same timestamp(" + key
+ "): previous/current=" + item.getStartAddress() + "/"
+ addressToString(address, startTimestamp));
}
} else {
TransactionMapItem item = _recoveredTransactionMap.get(key);
if (item == null) {
if (backchainAddress != 0) {
throw new CorruptJournalException("Missing transaction record at with timestamp(" + key
+ "): previous/current=" + backchainAddress + "/"
+ addressToString(address, startTimestamp));
}
item = new TransactionMapItem(startTimestamp, address);
_recoveredTransactionMap.put(key, item);
} else {
if (backchainAddress == 0) {
throw new CorruptJournalException("Duplicate transactions with same timestamp(" + key
+ "): previous/current=" + item.getStartAddress() + "/"
+ addressToString(address, startTimestamp));
}
if (item.isCommitted()) {
throw new CorruptJournalException("Redundant Transaction Commit Record for " + item + " at "
+ addressToString(address, startTimestamp));
}
if (backchainAddress != item.getLastRecordAddress()) {
throw new CorruptJournalException("Broken backchain at " + addressToString(address)
+ " does not match previous record " + item);
}
item.setLastRecordAddress(address);
}
item.setCommitTimestamp(commitTimestamp);
_persistit.getTimestampAllocator().updateTimestamp(commitTimestamp);
}
}