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

mmiller 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 3cf165b  Add new property tserver.max.scan.result.timeout (#2599)
3cf165b is described below

commit 3cf165b4fa97514dc454eef15ee03ed1601ace9e
Author: Mike Miller <mmil...@apache.org>
AuthorDate: Thu Mar 31 11:10:51 2022 -0400

    Add new property tserver.max.scan.result.timeout (#2599)
---
 core/src/main/java/org/apache/accumulo/core/conf/Property.java        | 3 +++
 .../main/java/org/apache/accumulo/tserver/ThriftClientHandler.java    | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java 
b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 06131bc..e822ea7 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -395,6 +395,9 @@ public enum Property {
       "Properties in this category affect the behavior of the tablet servers", 
"1.3.5"),
   TSERV_CLIENT_TIMEOUT("tserver.client.timeout", "3s", 
PropertyType.TIMEDURATION,
       "Time to wait for clients to continue scans before closing a session.", 
"1.3.5"),
+  TSERV_MAX_SCAN_RESULT_TIMEOUT("tserver.max.scan.result.timeout", "1s", 
PropertyType.TIMEDURATION,
+      "Max time for the thrift client handler to wait for scan results before 
timing out.",
+      "2.1.0"),
   TSERV_DEFAULT_BLOCKSIZE("tserver.default.blocksize", "1M", 
PropertyType.BYTES,
       "Specifies a default blocksize for the tserver caches", "1.3.5"),
   TSERV_CACHE_MANAGER_IMPL("tserver.cache.manager.class",
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/ThriftClientHandler.java
 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/ThriftClientHandler.java
index 772014e..5264991 100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/ThriftClientHandler.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/ThriftClientHandler.java
@@ -165,7 +165,7 @@ import io.opentelemetry.context.Scope;
 public class ThriftClientHandler extends ClientServiceHandler implements 
TabletClientService.Iface {
 
   private static final Logger log = 
LoggerFactory.getLogger(ThriftClientHandler.class);
-  private static final long MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS = 1000;
+  private final long MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS;
   private static final long RECENTLY_SPLIT_MILLIES = MINUTES.toMillis(1);
   private final TabletServer server;
   private final WriteTracker writeTracker = new WriteTracker();
@@ -174,6 +174,8 @@ public class ThriftClientHandler extends 
ClientServiceHandler implements TabletC
   public ThriftClientHandler(TabletServer server) {
     super(server.getContext(), new TransactionWatcher(server.getContext()));
     this.server = server;
+    MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS = 
server.getContext().getConfiguration()
+        .getTimeInMillis(Property.TSERV_MAX_SCAN_RESULT_TIMEOUT);
     log.debug("{} created", ThriftClientHandler.class.getName());
   }
 

Reply via email to