arshadmohammad commented on a change in pull request #1546:
URL: https://github.com/apache/hbase/pull/1546#discussion_r411963210
##########
File path:
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java
##########
@@ -741,6 +741,10 @@ public static int getNumberOfChildren(ZKWatcher zkw,
String znode)
if (nodes != null) {
List<NodeAndData> newNodes = new ArrayList<>();
for (String node : nodes) {
+ if (Thread.interrupted()) {
+ // Partial data should not be processed. Cancel processing by
sending empty list.
Review comment:
@virajjasani for the reviews
I have not understood if there is any concern on the change from your
comment. But still let me explain bit more.
When cancel is called on childrenChangedFuture, irrespective of which method
is executing inside run method, run method should finish. Inside run method we
are invoking two independent methods getChildDataAndWatchForNewChildren and
refreshNodes. So both should handle the interrupted state of the thread.
refreshNodes method was already handling it, so i have added handling only for
getChildDataAndWatchForNewChildren.
----------------------------------------------------------------
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]