Skip to content

Commit 78cbdbe

Browse files
authored
Only read data for fate lock from zookeeper when its used (apache#5180)
1 parent d53c1c6 commit 78cbdbe

File tree

1 file changed

+1
-1
lines changed
  • core/src/main/java/org/apache/accumulo/core/fate/zookeeper

1 file changed

+1
-1
lines changed

core/src/main/java/org/apache/accumulo/core/fate/zookeeper/FateLock.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ public SortedMap<Long,byte[]> getEarlierEntries(long entry) {
103103
for (String name : children) {
104104
// this try catch must be done inside the loop because some subset of the children may exist
105105
try {
106-
byte[] data = zoo.getData(path + "/" + name);
107106
long order = Long.parseLong(name.substring(PREFIX.length()));
108107
if (order <= entry) {
108+
byte[] data = zoo.getData(path + "/" + name);
109109
result.put(order, data);
110110
}
111111
} catch (KeeperException.NoNodeException ex) {

0 commit comments

Comments
 (0)