dlmarion commented on code in PR #5256:
URL: https://github.com/apache/accumulo/pull/5256#discussion_r1929607514


##########
core/src/main/java/org/apache/accumulo/core/zookeeper/ZooCache.java:
##########
@@ -391,44 +425,27 @@ public byte[] run() throws KeeperException, 
InterruptedException {
           if (zcn != null && zcn.cachedData()) {
             return zcn;
           }
-          /*
-           * The following call to exists() is important, since we are caching 
that a node does not
-           * exist. Once the node comes into existence, it will be added to 
the cache. But this
-           * notification of a node coming into existence will only be given 
if exists() was
-           * previously called. If the call to exists() is bypassed and only 
getData() is called
-           * with a special case that looks for Code.NONODE in the 
KeeperException, then
-           * non-existence can not be cached.
-           */
           try {
-            Stat stat = zk.exists(zPath, watcher);
-            if (stat == null) {
-              if (log.isTraceEnabled()) {
-                log.trace("{} zookeeper did not contain {}", cacheId, zPath);
-              }
+            byte[] data = null;
+            Stat stat = new Stat();
+            ZcStat zstat = null;
+            try {
+              data = zk.getData(zPath, null, stat);
+              zstat = new ZcStat(stat);
+            } catch (KeeperException.BadVersionException | 
KeeperException.NoNodeException e1) {

Review Comment:
   Removed BadVersionException in ddeee6b



-- 
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: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to