You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2022/07/30 00:20:13 UTC

[GitHub] [helix] qqu0127 commented on a diff in pull request #2180: Reuse zkclient in BestPossibleExternalViewVerifier and fix resource leak

qqu0127 commented on code in PR #2180:
URL: https://github.com/apache/helix/pull/2180#discussion_r933694934


##########
helix-core/src/main/java/org/apache/helix/tools/ClusterVerifiers/ZkHelixClusterVerifier.java:
##########
@@ -44,7 +44,7 @@
 import org.slf4j.LoggerFactory;
 
 public abstract class ZkHelixClusterVerifier
-    implements IZkChildListener, IZkDataListener, HelixClusterVerifier {
+    implements IZkChildListener, IZkDataListener, HelixClusterVerifier, AutoCloseable {

Review Comment:
   Yes, what you said sounds correct. 
   To make sure we are on the same page, `public void close()` has been implemented in this class to close zkclient and with respect to usesExternalZkClient. Its child class, e.g. BestPossibleExternalViewVerifier, there is no need to override again since it has no other resource to close. Implementing `close()` here benefits other children classes as well.



-- 
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: reviews-unsubscribe@helix.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org