Minor fixes.

This commit is contained in:
Greg Burd 2017-10-30 11:49:48 -04:00
parent c3f9b83770
commit 5605824886
2 changed files with 7 additions and 3 deletions

View file

@ -256,7 +256,7 @@ public abstract class AbstractUnitOfWork<E extends Exception> implements UnitOfW
}
}
// log.recordCacheAndDatabaseOperationCount(txn::provisionalCommit)
// log.record(txn::provisionalCommit)
// examine log for conflicts in read-set and write-set between begin and
// provisional commit
// if (conflict) { throw new ConflictingUnitOfWorkException(this) }
@ -310,12 +310,14 @@ public abstract class AbstractUnitOfWork<E extends Exception> implements UnitOfW
public synchronized void abort() {
TreeTraverser<AbstractUnitOfWork<E>> traverser = TreeTraverser.using(node -> node::getChildNodes);
traverser.postOrderTraversal(this).forEach(uow -> {
uow.committed = false;
uow.aborted = true;
uow.committed = false;
uow.aborted = true;
});
// log.record(txn::abort)
// cache.invalidateSince(txn::start time)
if (!hasAborted()) {
committed = false;
aborted = true;
elapsedTime.stop();
if (LOG.isInfoEnabled()) {
LOG.info(logTimers("aborted"));

View file

@ -321,6 +321,8 @@ public final class HelenusSession extends AbstractSessionOperations implements C
int frame = 2;
if (trace[2].getMethodName().equals("begin")) {
frame = 3;
} else if (trace[2].getClassName().equals(unitOfWorkClass.getName())) {
frame = 3;
}
purpose = new StringBuilder().append(trace[frame].getClassName()).append(".")
.append(trace[frame].getMethodName()).append("(").append(trace[frame].getFileName()).append(":")