Skip to content

Commit

Permalink
Evidence of duplicate acquires. Try to eliminate
Browse files Browse the repository at this point in the history
  • Loading branch information
mreyescdl committed Feb 5, 2025
1 parent ba0ed10 commit 8307d5d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/cdlib/mrt/zk/QueueItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,10 @@ public void setStatusTrigger(ZooKeeper client) throws MerrittZKNodeInvalid, Keep
public boolean lock(ZooKeeper client) throws InterruptedException {
String statpath = makePath(ZKKey.LOCK);
try {
QueueItemHelper.createEphemeral(client, statpath, QueueItemHelper.empty);
return true;
if (! QueueItemHelper.createEphemeral(client, statpath, QueueItemHelper.empty).isEmpty())
return true;
else
return false;
} catch(KeeperException e) {
return false;
}
Expand Down

0 comments on commit 8307d5d

Please sign in to comment.