}
void canCommit(final DataTreeCandidate tip) throws ExecutionException, TimeoutException {
- LOG.debug("{}: canCommit - candidate: {}", txId, tip);
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("{}: canCommit - candidate: {}", txId, tip);
+ } else {
+ LOG.debug("{}: canCommit - candidate rootPath: {}", txId, tip.getRootPath());
+ }
final List<CanCommit> messages = registry.createCanCommitMessages(txId, tip, schema);
LOG.debug("{}: canCommit - messages: {}", txId, messages);
final Iterable<Object> results;
try {
- results = Await.result(Futures.sequence(Lists.transform(futures, e -> e.getValue()),
+ results = Await.result(Futures.sequence(Lists.transform(futures, Entry::getValue),
ExecutionContexts.global()), timeout.duration());
} catch (TimeoutException e) {
successfulFromPrevious = null;
while (it.hasNext()) {
firstEx.addSuppressed(it.next().cause());
}
- Throwables.propagateIfInstanceOf(firstEx, ExecutionException.class);
- Throwables.propagateIfInstanceOf(firstEx, TimeoutException.class);
+ Throwables.throwIfInstanceOf(firstEx, ExecutionException.class);
+ Throwables.throwIfInstanceOf(firstEx, TimeoutException.class);
throw new ExecutionException(firstEx);
}
changeStateFrom(currentState, afterState);