rdhabalia commented on a change in pull request #1937: [bk-gc] Fix GC thread
gets blocked
URL: https://github.com/apache/bookkeeper/pull/1937#discussion_r254496167
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/util/ZkUtils.java
##########
@@ -240,7 +242,12 @@ public void operationComplete(int rc, List<String>
ledgers) {
synchronized (ctx) {
while (!ctx.done) {
- ctx.wait();
+ try {
+ ctx.wait(TimeUnit.SECONDS.toMillis(OP_TIME_OUT_SEC));
Review comment:
umm.. if no one calls `ctx.done = true; ctx.notifyAll();` at line#238 then
`ctx.wait(timeout)` will throw `InterruptedException` and `ctx.done will be
true;` at line#249 which takes out thread out of while loop. So, it will not
keep waiting but exit. right?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services