You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/10/18 02:35:20 UTC

[GitHub] [bookkeeper] zymap commented on a diff in pull request #3542: PendingReadOP supports fail-fast read

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


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java:
##########
@@ -406,6 +413,14 @@ synchronized BookieId sendNextRead() {
 
             try {
                 BookieId to = ensemble.get(bookieIndex);
+                if (clientCtx.getBookieWatcher().isBookieUnavailable(to)) {
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("Skipping send read request to unavailable bookie: {}", to.getId());
+                    }
+                    erroredReplicas.set(replica);
+                    sentReplicas.set(replica);
+                    return null;

Review Comment:
   We need to trigger the next read. Otherwise, if this is the first read request, no more reads will be sent.



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