Minor fixes.
This commit is contained in:
parent
c3f9b83770
commit
5605824886
2 changed files with 7 additions and 3 deletions
|
@ -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
|
// examine log for conflicts in read-set and write-set between begin and
|
||||||
// provisional commit
|
// provisional commit
|
||||||
// if (conflict) { throw new ConflictingUnitOfWorkException(this) }
|
// if (conflict) { throw new ConflictingUnitOfWorkException(this) }
|
||||||
|
@ -310,12 +310,14 @@ public abstract class AbstractUnitOfWork<E extends Exception> implements UnitOfW
|
||||||
public synchronized void abort() {
|
public synchronized void abort() {
|
||||||
TreeTraverser<AbstractUnitOfWork<E>> traverser = TreeTraverser.using(node -> node::getChildNodes);
|
TreeTraverser<AbstractUnitOfWork<E>> traverser = TreeTraverser.using(node -> node::getChildNodes);
|
||||||
traverser.postOrderTraversal(this).forEach(uow -> {
|
traverser.postOrderTraversal(this).forEach(uow -> {
|
||||||
uow.committed = false;
|
uow.committed = false;
|
||||||
uow.aborted = true;
|
uow.aborted = true;
|
||||||
});
|
});
|
||||||
// log.record(txn::abort)
|
// log.record(txn::abort)
|
||||||
// cache.invalidateSince(txn::start time)
|
// cache.invalidateSince(txn::start time)
|
||||||
if (!hasAborted()) {
|
if (!hasAborted()) {
|
||||||
|
committed = false;
|
||||||
|
aborted = true;
|
||||||
elapsedTime.stop();
|
elapsedTime.stop();
|
||||||
if (LOG.isInfoEnabled()) {
|
if (LOG.isInfoEnabled()) {
|
||||||
LOG.info(logTimers("aborted"));
|
LOG.info(logTimers("aborted"));
|
||||||
|
|
|
@ -321,6 +321,8 @@ public final class HelenusSession extends AbstractSessionOperations implements C
|
||||||
int frame = 2;
|
int frame = 2;
|
||||||
if (trace[2].getMethodName().equals("begin")) {
|
if (trace[2].getMethodName().equals("begin")) {
|
||||||
frame = 3;
|
frame = 3;
|
||||||
|
} else if (trace[2].getClassName().equals(unitOfWorkClass.getName())) {
|
||||||
|
frame = 3;
|
||||||
}
|
}
|
||||||
purpose = new StringBuilder().append(trace[frame].getClassName()).append(".")
|
purpose = new StringBuilder().append(trace[frame].getClassName()).append(".")
|
||||||
.append(trace[frame].getMethodName()).append("(").append(trace[frame].getFileName()).append(":")
|
.append(trace[frame].getMethodName()).append("(").append(trace[frame].getFileName()).append(":")
|
||||||
|
|
Loading…
Reference in a new issue