You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/23 07:24:34 UTC

[GitHub] [pulsar] Jason918 commented on a diff in pull request #17226: [Branch-2.8][improve][broker]Add retry for zk operation on connection loss

Jason918 commented on code in PR #17226:
URL: https://github.com/apache/pulsar/pull/17226#discussion_r952243511


##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java:
##########
@@ -163,6 +169,11 @@ public CompletableFuture<List<String>> getChildrenFromStore(String path) {
                             future.completeExceptionally(ex);
                             return null;
                         });
+                    } else if (code == Code.CONNECTIONLOSS) {
+                        // There is the chance that we caused a connection reset by sending or requesting a batch
+                        // that passed the max ZK limit. Retry with the individual operations
+                        executor.schedule(() -> getChildrenFromStore(path),

Review Comment:
   We need pass the result of `getChildrenFromStore` to `future` in this.



-- 
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@pulsar.apache.org

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