dlmarion commented on code in PR #3984:
URL: https://github.com/apache/accumulo/pull/3984#discussion_r1406580285
##########
core/src/main/java/org/apache/accumulo/core/rpc/clients/TServerClient.java:
##########
@@ -72,11 +72,23 @@ default Pair<String,C> getThriftServerConnection(Logger
LOG, ThriftClientTypes<C
}
ZooCache zc = context.getZooCache();
for (String serverPath : serverPaths) {
- for (String server : zc.getChildren(serverPath)) {
- var zLocPath = ServiceLock.path(serverPath + "/" + server);
- zc.getLockData(zLocPath).map(sld -> sld.getAddress(service))
- .map(address -> new ThriftTransportKey(address, rpcTimeout,
context))
- .ifPresent(servers::add);
+ if (!serverPath.endsWith(Constants.ZCOMPACTORS)) {
+ for (String server : zc.getChildren(serverPath)) {
+ var zLocPath = ServiceLock.path(serverPath + "/" + server);
+ zc.getLockData(zLocPath).map(sld -> sld.getAddress(service))
+ .map(address -> new ThriftTransportKey(address, rpcTimeout,
context))
+ .ifPresent(servers::add);
+ }
+ } else {
Review Comment:
You are just suggesting that I remove the negation in the `if` predicate for
readability or something? I wouldn't say it's a `default` else. It will only
get in there when serverPath ends with ZCOMPACTORS.
--
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]