You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by is...@apache.org on 2021/02/12 09:26:18 UTC
[lucene-solr] branch jira/solr15138 updated: SOLR-15136: Reduce
excessive logging introduced with Per Replica States feature
This is an automated email from the ASF dual-hosted git repository.
ishan pushed a commit to branch jira/solr15138
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/jira/solr15138 by this push:
new 0ed3b52 SOLR-15136: Reduce excessive logging introduced with Per Replica States feature
0ed3b52 is described below
commit 0ed3b5282b3f8c5c8e95d90cc333d5e9bda95776
Author: Ishan Chattopadhyaya <is...@apache.org>
AuthorDate: Fri Feb 12 11:52:19 2021 +0530
SOLR-15136: Reduce excessive logging introduced with Per Replica States feature
---
solr/CHANGES.txt | 2 ++
.../java/org/apache/solr/common/cloud/PerReplicaStatesOps.java | 10 +++++-----
.../src/java/org/apache/solr/common/cloud/ZkStateReader.java | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index a34806e..a0d436d 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -240,6 +240,8 @@ Other Changes
---------------------
(No changes)
+* SOLR-15136: Reduce excessive logging introduced with Per Replica States feature (Ishan Chattopadhyaya)
+
================== 8.8.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/PerReplicaStatesOps.java b/solr/solrj/src/java/org/apache/solr/common/cloud/PerReplicaStatesOps.java
index 117ee02..ddb07a2 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/PerReplicaStatesOps.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/PerReplicaStatesOps.java
@@ -76,7 +76,7 @@ public class PerReplicaStatesOps {
}
/**
- * There is a possibility that a replica may have some leftover entries . delete them too
+ * There is a possibility that a replica may have some leftover entries. Delete them too.
*/
private static List<PerReplicaStates.Operation> addDeleteStaleNodes(List<PerReplicaStates.Operation> ops, PerReplicaStates.State rs) {
while (rs != null) {
@@ -96,9 +96,9 @@ public class PerReplicaStatesOps {
persist(operations, znode, zkClient);
return;
} catch (KeeperException.NodeExistsException | KeeperException.NoNodeException e) {
- //state is stale
+ // state is stale
if (log.isInfoEnabled()) {
- log.info("stale state for {} , attempt: {}. retrying...", znode, i);
+ log.info("Stale state for {}, attempt: {}. retrying...", znode, i);
}
operations = refresh(PerReplicaStates.fetch(znode, zkClient, null));
}
@@ -110,7 +110,7 @@ public class PerReplicaStatesOps {
}
/**
- * state of a replica is changed
+ * Change the state of a replica
*
* @param newState the new state
*/
@@ -218,7 +218,7 @@ public class PerReplicaStatesOps {
}
/**
- * mark a bunch of replicas as DOWN
+ * Mark the given replicas as DOWN
*/
public static PerReplicaStatesOps downReplicas(List<String> replicas, PerReplicaStates rs) {
return new PerReplicaStatesOps(prs -> {
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index 8aad139..ccd93c6 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -1463,7 +1463,7 @@ public class ZkStateReader implements SolrCloseable {
ClusterState.initReplicaStateProvider(() -> {
try {
PerReplicaStates replicaStates = PerReplicaStates.fetch(collectionPath, zkClient, null);
- log.info("per-replica-state ver: {} fetched for initializing {} ", replicaStates.cversion, collectionPath);
+ log.debug("per-replica-state ver: {} fetched for initializing {} ", replicaStates.cversion, collectionPath);
return replicaStates;
} catch (Exception e) {
//TODO