X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FCompositeDataTreeCohort.java;h=c4afcfd4d803cf275894d270c9d2574681558bfe;hp=a84fa4610d5763c9ab84ae73687640f1236024f5;hb=b5cb353e3553a39f576c284119af75ffa5ea66a9;hpb=0b3bfca7f39ee1bb6dcf5379f44d0b402adeb7fe diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/CompositeDataTreeCohort.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/CompositeDataTreeCohort.java index a84fa4610d..c4afcfd4d8 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/CompositeDataTreeCohort.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/CompositeDataTreeCohort.java @@ -134,7 +134,11 @@ class CompositeDataTreeCohort { } 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 messages = registry.createCanCommitMessages(txId, tip, schema); LOG.debug("{}: canCommit - messages: {}", txId, messages); @@ -220,7 +224,7 @@ class CompositeDataTreeCohort { final Iterable 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; @@ -264,8 +268,8 @@ class CompositeDataTreeCohort { 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);