This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new fecbe5b490 speeds up finding any server to connect to (#5039)
fecbe5b490 is described below

commit fecbe5b4901ab426aed8ba172c59a05927779fbc
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Thu Nov 7 21:43:44 2024 -0500

    speeds up finding any server to connect to (#5039)
    
    When looking for any accumulo server to connect to client code would
    read all servers and check their locks. This change avoid checking locks
    for all servers and only checks the locks for the ones the code tries to
    connect to.
---
 .../java/org/apache/accumulo/core/rpc/clients/TServerClient.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/rpc/clients/TServerClient.java 
b/core/src/main/java/org/apache/accumulo/core/rpc/clients/TServerClient.java
index e7236a1365..45ab3c86fa 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/clients/TServerClient.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/clients/TServerClient.java
@@ -95,12 +95,12 @@ public interface TServerClient<C extends TServiceClient> {
           context.getServerPaths().getTabletServer(rg -> true, 
AddressSelector.exact(hp), true));
     } else {
       serverPaths.addAll(
-          context.getServerPaths().getTabletServer(rg -> true, 
AddressSelector.all(), true));
+          context.getServerPaths().getTabletServer(rg -> true, 
AddressSelector.all(), false));
       if (type == ThriftClientTypes.CLIENT) {
-        serverPaths
-            .addAll(context.getServerPaths().getCompactor(rg -> true, 
AddressSelector.all(), true));
         serverPaths.addAll(
-            context.getServerPaths().getScanServer(rg -> true, 
AddressSelector.all(), true));
+            context.getServerPaths().getCompactor(rg -> true, 
AddressSelector.all(), false));
+        serverPaths.addAll(
+            context.getServerPaths().getScanServer(rg -> true, 
AddressSelector.all(), false));
       }
       if (serverPaths.isEmpty()) {
         if (warned.compareAndSet(false, true)) {

Reply via email to