Description
It comes from email list which stack post.
This is the some relates QA information.
The reason is here.
writeLocksObtained.await(); writeLocksAttempted.await();
writeLocksAttempted maybe count down to 0 before created node on ZK, and main thread will go on to run lockManager.reapWriteLocks(), And after that node was created on ZK, so relates lock acquire will timeout.
I upload a patch which can reproduce this issue.