You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2019/02/06 23:09:31 UTC

[GitHub] merlimat commented on a change in pull request #1937: [bk-gc] Fix GC thread gets blocked

merlimat commented on a change in pull request #1937: [bk-gc] Fix GC thread gets blocked
URL: https://github.com/apache/bookkeeper/pull/1937#discussion_r254489635
 
 

 ##########
 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:
   In this case, if no one calls `ctx.done = true`,  the thread will just keep waiting in 2sec blocks, but it will never 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:
users@infra.apache.org


With regards,
Apache Git Services