You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/01/13 17:00:59 UTC
[GitHub] [accumulo] keith-turner commented on a change in pull request #1866: Add a UUID to the server's ZooLock
keith-turner commented on a change in pull request #1866:
URL: https://github.com/apache/accumulo/pull/1866#discussion_r556683483
##########
File path: core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
##########
@@ -259,7 +304,7 @@ public synchronized void lockAsync(final AsyncLockWatcher lw, byte[] data) {
lockWasAcquired = false;
try {
- final String asyncLockPath = zooKeeper.putEphemeralSequential(path + "/" + LOCK_PREFIX, data);
+ final String asyncLockPath = zooKeeper.putEphemeralSequential(path + "/" + THIS_ZLOCK, data);
Review comment:
In the case where the ephemeral node is created on the server and that is not successfully reported back, will a second ephemeral node be created? For example could we end up with two ephemeral nodes w/ the same UUID like:
```
zlock#44755fbe-1c9e-40b3-8458-03abaf950d7e#0000000002
zlock#44755fbe-1c9e-40b3-8458-03abaf950d7e#0000000003
```
If so, would the 2nd one created be returned to this code and would the 1st one continue to exists?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org