You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "hanmz (via GitHub)" <gi...@apache.org> on 2023/04/24 09:36:40 UTC

[GitHub] [bookkeeper] hanmz opened a new pull request, #3932: Improve recovery read when bookie is not available.

hanmz opened a new pull request, #3932:
URL: https://github.com/apache/bookkeeper/pull/3932

   ### Motivation
   It solves https://github.com/apache/bookkeeper/issues/3931
   
   ### Changes
   Return BookieHandleNotAvailableException immediately if bookie is not available when recovery read. In the case of network isolation, reading a faulty bookie node will time out, which will cause a slow recovery or even timeout.


-- 
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


[GitHub] [bookkeeper] merlimat commented on a diff in pull request #3932: Improve recovery read when bookie is not available.

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on code in PR #3932:
URL: https://github.com/apache/bookkeeper/pull/3932#discussion_r1186710023


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java:
##########
@@ -576,6 +576,14 @@ void sendReadTo(int bookieIndex, BookieId to, LedgerEntryRequest entry) throws I
         }
 
         if (isRecoveryRead) {
+            // Return BookieHandleNotAvailableException immediately if bookie is not available when recovery read.
+            // In the case of network isolation, reading a faulty bookie node will time out,
+            // which will cause a slow recovery or even timeout.
+            if (clientCtx.getBookieWatcher().isBookieUnavailable(to)) {

Review Comment:
   One issue here is if the bookie is partitioned from ZK though it's effectively online and reachable from the BK client. This change will make it fail while today it's succeeding.



-- 
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