pkuwm commented on a change in pull request #1526:
URL: https://github.com/apache/helix/pull/1526#discussion_r546036269
##########
File path:
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkConnection.java
##########
@@ -192,4 +234,59 @@ public String getServers() {
public void addAuthInfo(String scheme, byte[] auth) {
_zk.addAuthInfo(scheme, auth);
}
+
+ private void lookupGetChildrenMethod() {
Review comment:
1. It is a two step lookup: lookup the client lib, and call server. If
we do lookup at the construction stage, we have to call server to know if
server supports pagination or not. This is an extra call.
2. We'd like to save this extra call by using lazy init.
a. only when the first getChildren call, we get the method from client zk,
then send it to server
b. If server does not support, we fallback to non-paginated. And cache it.
c. Future calls, it’ll always use the cached method to getChildren
Synced with @dasahcc offline, he agreed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]