xyuanlu commented on code in PR #2550:
URL: https://github.com/apache/helix/pull/2550#discussion_r1248292657
##########
meta-client/src/main/java/org/apache/helix/metaclient/recipes/lock/DistributedSemaphore.java:
##########
@@ -75,9 +76,12 @@ public DistributedSemaphore(MetaClientInterface<DataRecord>
client) {
_metaClient = client;
try {
_metaClient.connect();
- // TODO: Differentiate exception catch between already connected and
already closed.
} catch (IllegalStateException e) {
- // Ignore as it either has already been connected or already been closed.
+ if (e.getMessage().contains("connect() has already been called")) {
+ LOG.info("Client already connected");
Review Comment:
Checking test message is a hacky way. Any other options?
##########
meta-client/src/main/java/org/apache/helix/metaclient/impl/zk/util/ZkMetaClientUtil.java:
##########
@@ -235,6 +237,8 @@ public static MetaClientException
translateZkExceptionToMetaclientException(ZkEx
return new MetaClientTimeoutException(e);
} else if (e instanceof ZkInterruptedException) {
return new MetaClientInterruptException(e);
+ } else if (e instanceof ZkNodeExistsException) {
Review Comment:
Where is this exception used?
--
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]