EdColeman commented on code in PR #2778:
URL: https://github.com/apache/accumulo/pull/2778#discussion_r934636344


##########
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/ZooPropStore.java:
##########
@@ -391,4 +399,26 @@ public PropCache getCache() {
   public @Nullable VersionedProperties getWithoutCaching(PropStoreKey<?> 
propStoreKey) {
     return cache.getWithoutCaching(propStoreKey);
   }
+
+  @Override
+  public boolean validateDataVersion(PropStoreKey<?> storeKey, long 
expectedVersion) {
+    try {
+      Stat stat = zrw.getStatus(storeKey.getPath());
+      log.trace("data version sync: stat returned: {} for {}", stat, storeKey);
+      if (stat == null || expectedVersion != stat.getVersion()) {
+        propStoreWatcher.signalZkChangeEvent(storeKey);
+        return false;
+      }
+    } catch (InterruptedException ex) {
+      Thread.currentThread().interrupt();
+      throw new IllegalStateException(ex);
+    } catch (KeeperException.NoNodeException ex) {
+      propStoreWatcher.signalZkChangeEvent(storeKey);

Review Comment:
   I was allowing the `signalZkChangeEvent` to propagate the change (this 
removes it from the cache) - I'll change it to return false so that it is 
immediacy removed from the snapshot too.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to