dlmarion commented on code in PR #5008:
URL: https://github.com/apache/accumulo/pull/5008#discussion_r1812642334


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/ZookeeperLockChecker.java:
##########
@@ -59,11 +59,8 @@ public boolean isLockHeld(String server, String session) {
 
   @Override
   public void invalidateCache(String tserver) {
-    var hostAndPort = HostAndPort.fromString(tserver);
-    ctx.getServerPaths().getTabletServer(rg -> true, 
AddressSelector.exact(hostAndPort), false)
-        .forEach(slp -> {
-          ctx.getZooCache().clear(slp.toString());
-        });
+    // The path for the tserver contains a resource group. The resource group 
is unknown, so can not
+    // construct a prefix. Therefore clear any path that contains the tserver.
+    ctx.getZooCache().clear(path -> path.contains(tserver));

Review Comment:
   I'm wondering if this could overmatch, where the tserver is also in another 
path, like dead tservers or something. I wonder if we want the predicate to be:
   ```
   path.startsWith(ctx.getZooKeeperRoot() + Constants.ZTSERVERS) && 
path.contains(tserver)
   ```



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

Reply via email to