X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FDistributedDataStore.java;h=5ade98cb86106a7b65d82251dccced95c93f0914;hb=refs%2Fchanges%2F14%2F16914%2F2;hp=3029ef7e399a4db99c6ed2ad18a7e7701cb2f8ee;hpb=09b8efdb40105cd4cd3c21c9a9aea2c6687972be;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java index 3029ef7e39..5ade98cb86 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java @@ -178,11 +178,13 @@ public class DistributedDataStore implements DOMStore, SchemaContextListener, LOG.info("Beginning to wait for data store to become ready : {}", type); try { - waitTillReadyCountDownLatch.await(waitTillReadyTimeInMillis, TimeUnit.MILLISECONDS); - - LOG.debug("Data store {} is now ready", type); + if (waitTillReadyCountDownLatch.await(waitTillReadyTimeInMillis, TimeUnit.MILLISECONDS)) { + LOG.debug("Data store {} is now ready", type); + } else { + LOG.error("Shared leaders failed to settle in {} seconds, giving up", TimeUnit.MILLISECONDS.toSeconds(waitTillReadyTimeInMillis)); + } } catch (InterruptedException e) { - LOG.error("Interrupted when trying to wait for shards to become leader in a reasonable amount of time - giving up"); + LOG.error("Interrupted while waiting for shards to settle", e); } }