ctubbsii commented on pull request #1958:
URL: https://github.com/apache/accumulo/pull/1958#issuecomment-792956720


   If the offending code is the validation in AdminUtil, then it probably got 
introduced in my fix for #1926. I probably failed to realize that the lock node 
used for Fate locks was a different path and syntax than other locks, because 
all the lock node paths are passed around as Strings, instead a more specific 
type.
   
   It might be beneficial to change the code around locking to have more 
specific types, to prevent this in future. I'm thinking something like:
   
   ```java
   FateLockPath fLockPath = FateLock.path(somePathString);
   ZooQueueLock.validateAndSort(fLockPath, children);
   
   ZooLockPath zLockPath = ZooLock.path(somePathString);
   ZooLock.validateAndSort(zLockPath, children);
   ```
   
   Doing something like this would ensure we can tell the difference between a 
lock path used for ZooQueueLock and one used for ZooLock, which are very 
different.
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to