Debug log level where appropriate + Throwing an exception where appropriate
Change-Id: Ica18c122c8a2cb8286d4f48c017a06ffe10452e1
diff --git a/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/ClusterManager.java b/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/ClusterManager.java
index 39732df..f8202fc 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/ClusterManager.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/ClusterManager.java
@@ -135,7 +135,7 @@
nodeInfo.getTcpPort()))
.collect(Collectors.toSet());
} catch (IOException e) {
- log.warn("Failed to read cluster definition.", e);
+ throw new IllegalStateException("Failed to read cluster definition.", e);
}
seedNodes.forEach(node -> {
@@ -278,7 +278,7 @@
}
});
} catch (Exception e) {
- log.trace("Failed to send heartbeat", e);
+ log.debug("Failed to send heartbeat", e);
}
}
@@ -295,7 +295,7 @@
try {
messagingService.sendAsync(remoteEp, HEARTBEAT_MESSAGE, messagePayload);
} catch (IOException e) {
- log.trace("Sending heartbeat to {} failed", remoteEp, e);
+ log.debug("Sending heartbeat to {} failed", remoteEp, e);
}
}
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java
index dcb2dbd..3b65ec0 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java
@@ -190,7 +190,7 @@
@Override
public void runForLeadership(String path) {
- log.trace("Running for leadership for topic: {}", path);
+ log.debug("Running for leadership for topic: {}", path);
activeTopics.add(path);
tryLeaderLock(path);
}
@@ -358,7 +358,7 @@
}
}
if (localNodeId.equals(nodeId) && !activeTopics.contains(path)) {
- log.info("Lock for {} is held by {} when it not running for leadership.", path, nodeId);
+ log.debug("Lock for {} is held by {} when it not running for leadership.", path, nodeId);
try {
if (lockMap.remove(path, epoch)) {
log.info("Purged stale lock held by {} for {}", nodeId, path);