pkuwm commented on a change in pull request #1109:
URL: https://github.com/apache/helix/pull/1109#discussion_r443716443
##########
File path:
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java
##########
@@ -984,11 +1000,43 @@ private void fireAllEvents() {
protected List<String> getChildren(final String path, final boolean watch) {
long startT = System.currentTimeMillis();
+ // Need one element array to change value of this final variable.
+ final int[] connectionLossRetryCount = {0};
Review comment:
This variable needs to be accessed in inner class Callable so it needs
to be final.
And since it is final, we could not increment the value if we make a an
integer. So we need this one element array to change value of this final
variable. I understand it looks a bit ugly, but since we are removing the code
part in a few months once we have a better way in zk server, I wanted to make
it simple without creating a wrapper class.
##########
File path:
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java
##########
@@ -103,6 +108,17 @@
// ZkEventThread. Otherwise the retry request might block the normal event
processing.
protected final ZkAsyncRetryThread _asyncCallRetryThread;
+ static {
Review comment:
I added a TODO at `getChildren()` so when we remove that code part at
getChildren(), we will also remove this private LIMIT. To make it clear, I also
add a TODO for `NUM_CHILDREN_LIMIT`.
----------------------------------------------------------------
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]