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

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


The following commit(s) were added to refs/heads/2.1 by this push:
     new fe998f73a0 Fix bug with calculating remaining timeout in 
TabletServerBatchReaderIterator (#4893)
fe998f73a0 is described below

commit fe998f73a0bb7f48c9172249db5e7ae7187c6bd8
Author: Dom G. <domgargu...@apache.org>
AuthorDate: Thu Sep 26 15:24:20 2024 -0400

    Fix bug with calculating remaining timeout in 
TabletServerBatchReaderIterator (#4893)
---
 .../accumulo/core/clientImpl/TabletServerBatchReaderIterator.java      | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java
 
b/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java
index f43f571f6c..bf47678b9a 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchReaderIterator.java
@@ -616,8 +616,6 @@ public class TabletServerBatchReaderIterator implements 
Iterator<Entry<Key,Value
     // get a snapshot of this once,not each time the plugin request it
     var scanAttemptsSnapshot = scanAttempts.snapshot();
 
-    Duration timeoutLeft = Duration.ofMillis(retryTimeout - 
startTime.elapsed(MILLISECONDS));
-
     ScanServerSelector.SelectorParameters params = new 
ScanServerSelector.SelectorParameters() {
       @Override
       public Collection<TabletId> getTablets() {
@@ -637,6 +635,7 @@ public class TabletServerBatchReaderIterator implements 
Iterator<Entry<Key,Value
       @Override
       public <T> Optional<T> waitUntil(Supplier<Optional<T>> condition, 
Duration maxWaitTime,
           String description) {
+        Duration timeoutLeft = Duration.ofMillis(retryTimeout - 
startTime.elapsed(MILLISECONDS));
         return ThriftScanner.waitUntil(condition, maxWaitTime, description, 
timeoutLeft, context,
             tableId, log);
       }

Reply via email to