kevinrr888 commented on code in PR #5728: URL: https://github.com/apache/accumulo/pull/5728#discussion_r2201156941
########## core/src/main/java/org/apache/accumulo/core/fate/ZooStore.java: ########## @@ -130,6 +136,31 @@ public long create() { } } + /* + * Holds a copy of all of the fate transaction in zookeeper. Used for finding the next one to + * reserve. When empty a single thread will refill. All fate threads can pull off of the queue as + * they look for something to reserve. This is used so that each thread does not have to read all + * children from zookeeper when looking for any fate tx to reserve. + */ + private final Queue<String> reservationCandidates = new ConcurrentLinkedQueue<>(); + private final Lock reservationCandidateLock = new ReentrantLock(); Review Comment: Yeah, on second look, locking the whole class would be overkill. This lock seems fine. -- 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. To unsubscribe, e-mail: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org