lhotari commented on code in PR #24665:
URL: https://github.com/apache/pulsar/pull/24665#discussion_r2303996141
##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java:
##########
@@ -482,6 +482,27 @@ public void close() throws Exception {
}
}
+ @Override
+ public CompletableFuture<List<String>> getChildrenFromStore(String path) {
+ CompletableFuture<List<String>> cb = new CompletableFuture<>();
+ zkc.getChildren(path, false, (rc, path1, ctx1, nodes) -> {
+ Code code = Code.get(rc);
+ if (code != Code.OK) {
+ if (code == Code.NONODE) {
+ cb.complete(Collections.emptyList());
+ return;
+ } else {
+ log.error("Error polling ZK for the available nodes: ",
KeeperException
+ .create(code, path1));
+ cb.completeExceptionally(getException(code, path1));
+ return;
+ }
+ }
+ cb.complete(nodes);
+ }, null);
+ return cb;
+ }
+
Review Comment:
I think that overriding this method isn't necessary. This would also have a
performance impact since batching wouldn't be used if this is overridden.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]