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 78cbdbe556 Only read data for fate lock from zookeeper when its used 
(#5180)
78cbdbe556 is described below

commit 78cbdbe5560272028b93401b9f2f4f792c625798
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Sat Dec 14 10:32:27 2024 -0500

    Only read data for fate lock from zookeeper when its used (#5180)
---
 .../src/main/java/org/apache/accumulo/core/fate/zookeeper/FateLock.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/FateLock.java 
b/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/FateLock.java
index fa0e4db7ed..9ac21a8d31 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/FateLock.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/FateLock.java
@@ -103,9 +103,9 @@ public class FateLock implements QueueLock {
       for (String name : children) {
         // this try catch must be done inside the loop because some subset of 
the children may exist
         try {
-          byte[] data = zoo.getData(path + "/" + name);
           long order = Long.parseLong(name.substring(PREFIX.length()));
           if (order <= entry) {
+            byte[] data = zoo.getData(path + "/" + name);
             result.put(order, data);
           }
         } catch (KeeperException.NoNodeException ex) {

Reply via email to