This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 0d54994205 Consistently log when property stores is invalidated (#4991)
0d54994205 is described below

commit 0d54994205269cb3d8a99eede8d088a1024f25f2
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Thu Oct 17 16:49:36 2024 -0400

    Consistently log when property stores is invalidated (#4991)
    
    PropStore was logging on some events that caused a need to refresh the
    properties and not others.  Modified to consistently log whenever an
    event caused the properties to be invalidated.
---
 .../java/org/apache/accumulo/server/conf/store/PropStoreKey.java    | 2 +-
 .../java/org/apache/accumulo/server/conf/util/PropSnapshot.java     | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java
 
b/server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java
index 786c5bfeb6..4ee2abd818 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java
@@ -152,6 +152,6 @@ public abstract class PropStoreKey<ID_TYPE extends 
AbstractId<ID_TYPE>>
   @Override
   public String toString() {
     return this.getClass().getSimpleName() + "{" + 
getId().getClass().getSimpleName() + "="
-        + getId().canonical() + "'}";
+        + getId().canonical() + "}";
   }
 }
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/conf/util/PropSnapshot.java
 
b/server/base/src/main/java/org/apache/accumulo/server/conf/util/PropSnapshot.java
index 625c3fa565..3f47cbbcbd 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/conf/util/PropSnapshot.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/conf/util/PropSnapshot.java
@@ -113,6 +113,7 @@ public class PropSnapshot implements PropChangeListener {
   public void zkChangeEvent(final PropStoreKey<?> eventPropKey) {
     if (propStoreKey.equals(eventPropKey)) {
       requireUpdate();
+      log.debug("Saw zk change event for {} - update properties required", 
propStoreKey);
     }
   }
 
@@ -120,6 +121,7 @@ public class PropSnapshot implements PropChangeListener {
   public void cacheChangeEvent(final PropStoreKey<?> eventPropKey) {
     if (propStoreKey.equals(eventPropKey)) {
       requireUpdate();
+      log.debug("Saw cache change event for {} - update properties required", 
propStoreKey);
     }
   }
 
@@ -127,14 +129,14 @@ public class PropSnapshot implements PropChangeListener {
   public void deleteEvent(final PropStoreKey<?> eventPropKey) {
     if (propStoreKey.equals(eventPropKey)) {
       requireUpdate();
-      log.debug("Received property delete event for {}", propStoreKey);
+      log.debug("Received property delete event for {} - update properties 
required", propStoreKey);
     }
   }
 
   @Override
   public void connectionEvent() {
     requireUpdate();
-    log.debug("Received connection event - update properties required");
+    log.debug("Received connection event for {} - update properties required", 
propStoreKey);
   }
 
 }

Reply via email to