You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "zymap (via GitHub)" <gi...@apache.org> on 2023/06/19 02:47:29 UTC

[GitHub] [bookkeeper] zymap commented on a diff in pull request #3961: When the thread has been interrupted, there is no need for waitBackOffTime

zymap commented on code in PR #3961:
URL: https://github.com/apache/bookkeeper/pull/3961#discussion_r1233468295


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ReplicationWorker.java:
##########
@@ -265,12 +265,12 @@ public void run() {
             } catch (UnavailableException e) {
                 LOG.error("UnavailableException "
                         + "while replicating fragments", e);
-                waitBackOffTime(rwRereplicateBackoffMs);
                 if (Thread.currentThread().isInterrupted()) {
                     LOG.error("Interrupted  while replicating fragments");
                     shutdown();
                     return;
                 }
+                waitBackOffTime(rwRereplicateBackoffMs);

Review Comment:
   We already handled the InterruptedException at line 251. It looks like there want to check if the thread is interrupted after waiting the time. In the waitBackOffTime, it may interrupt the current thread. 



-- 
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: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org