xyuanlu commented on code in PR #2515:
URL: https://github.com/apache/helix/pull/2515#discussion_r1235818420


##########
meta-client/src/main/java/org/apache/helix/metaclient/recipes/lock/LockClient.java:
##########
@@ -64,8 +64,12 @@ public LockClient(MetaClientInterface<LockInfo> client) {
       throw new IllegalArgumentException("MetaClient cannot be null.");
     }
     _metaClient = client;
-    LOG.info("Connecting to existing MetaClient for LockClient");
-    _metaClient.connect();
+    try {
+      LOG.info("Connecting to existing MetaClient for LockClient");
+      _metaClient.connect();
+    } catch (IllegalStateException e) {
+      // Ignore as it either has already been connected or already been closed.

Review Comment:
   One question. If the client is already closed, what exception do metaclient 
throw? If it is also IllegalStateException, we should considering differentiate 
calling `connect` on already connected client or on already closed client. 



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to