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

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


The following commit(s) were added to refs/heads/elasticity by this push:
     new f6828d30d9 fixes bug in merge tablet reservations (#4604)
f6828d30d9 is described below

commit f6828d30d9f69505355cb11cac69c09f939d1bff
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Fri May 24 18:17:27 2024 -0400

    fixes bug in merge tablet reservations (#4604)
    
    The fate step that reserves tablets for merge was signaling it
    was ready when it was not in the case where its scan of the
    metadata table took 0ms.  This was causing some ITs to fail.  The
    bug was introduced in #4574
---
 .../accumulo/manager/tableOps/merge/ReserveTablets.java      | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git 
a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/merge/ReserveTablets.java
 
b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/merge/ReserveTablets.java
index c6a8402da0..7380aafe81 100644
--- 
a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/merge/ReserveTablets.java
+++ 
b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/merge/ReserveTablets.java
@@ -115,14 +115,10 @@ public class ReserveTablets extends ManagerRepo {
     }
 
     long sleepTime = Math.min(Math.max(1000, count), maxSleepTime);
-    if (locations > 0 || otherOps > 0 || wals > 0) {
-      // need to wait on these tablets
-      return sleepTime;
-    }
-
-    if (opsSet != opsAccepted.get()) {
-      // not all operation ids were set
-      return sleepTime;
+    if (locations > 0 || otherOps > 0 || wals > 0 || opsSet != 
opsAccepted.get()) {
+      // need to wait on these tablets, must return non-zero to indicate not 
ready so need to handle
+      // case of sleepTime being zero
+      return Math.max(1, sleepTime);
     }
 
     // operations ids were set on all tablets and no tablets have locations, 
so ready

Reply via email to