HoustonPutman commented on code in PR #760:
URL: https://github.com/apache/solr/pull/760#discussion_r1811488646


##########
solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/SolrZkClient.java:
##########
@@ -993,14 +1051,33 @@ public void updateACLs(final String root) throws 
KeeperException, InterruptedExc
         ZkMaintenanceUtils.VISIT_ORDER.VISIT_POST,
         path -> {
           try {
-            setACL(path, getZkACLProvider().getACLsToAdd(path), true);
-            log.debug("Updated ACL on {}", path);
+            runWithCorrectThrows(
+                "updating acls", () -> 
client.setACL().withACL(null).forPath(path));
           } catch (NoNodeException ignored) {
             // If a node was deleted, don't bother trying to set ACLs on it.
           }
         });
   }
 
+  @FunctionalInterface
+  protected interface SupplierWithException<T> {
+    T get() throws Exception;
+  }
+
+  protected <T> T runWithCorrectThrows(String action, SupplierWithException<T> 
func)
+      throws KeeperException, InterruptedException {

Review Comment:
   We catch it, and re-throw it. The point is to not cover it up in a 
RuntimeException.



-- 
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: issues-unsubscr...@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to