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 14b23a63fb Fixes FATE deferral (#4067)
14b23a63fb is described below

commit 14b23a63fb72979433437f7b65eae1c6d8b4cd33
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Wed Dec 13 15:06:22 2023 -0500

    Fixes FATE deferral (#4067)
    
    This fixes a bug where when a FATE operation was not ready and was
    deferred that it may never run again.  Also improved some logging that
    was encountered while debugging this.  This bug was causing test in
    ConcurrentDeleteTableIT to hang forever because concurrent fate
    operations were deferred and then never ran again.
---
 core/src/main/java/org/apache/accumulo/core/fate/ZooStore.java    | 2 +-
 .../apache/accumulo/manager/tableOps/delete/ReserveTablets.java   | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/core/src/main/java/org/apache/accumulo/core/fate/ZooStore.java 
b/core/src/main/java/org/apache/accumulo/core/fate/ZooStore.java
index 38071ef182..7b2e3e8f38 100644
--- a/core/src/main/java/org/apache/accumulo/core/fate/ZooStore.java
+++ b/core/src/main/java/org/apache/accumulo/core/fate/ZooStore.java
@@ -531,7 +531,7 @@ public class ZooStore<T> implements FateStore<T> {
           runnableTids.removeIf(txid -> {
             var deferedTime = defered.get(txid);
             if (deferedTime != null) {
-              if (deferedTime < System.currentTimeMillis()) {
+              if (deferedTime >= System.currentTimeMillis()) {
                 return true;
               } else {
                 defered.remove(txid);
diff --git 
a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/delete/ReserveTablets.java
 
b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/delete/ReserveTablets.java
index 79ffc5e542..f98e851f50 100644
--- 
a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/delete/ReserveTablets.java
+++ 
b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/delete/ReserveTablets.java
@@ -27,6 +27,7 @@ import java.util.function.Consumer;
 
 import org.apache.accumulo.core.data.NamespaceId;
 import org.apache.accumulo.core.data.TableId;
+import org.apache.accumulo.core.fate.FateTxId;
 import org.apache.accumulo.core.fate.Repo;
 import org.apache.accumulo.core.metadata.schema.Ample;
 import org.apache.accumulo.core.metadata.schema.TabletOperationId;
@@ -61,7 +62,8 @@ public class ReserveTablets extends ManagerRepo {
       if (result.getStatus() == Ample.ConditionalResult.Status.ACCEPTED) {
         accepted.incrementAndGet();
       } else {
-        log.debug("Failed to set operation id {} {}", opid, 
result.getExtent());
+        log.debug("{} Failed to set operation id {} {}", 
FateTxId.formatTid(tid), opid,
+            result.getExtent());
       }
     };
 
@@ -95,8 +97,8 @@ public class ReserveTablets extends ManagerRepo {
     }
 
     if (locations > 0 || otherOps > 0 || submitted != accepted.get()) {
-      log.debug("Waiting to delete table locations:{} operations:{}  
submitted:{} accepted:{}",
-          locations, otherOps, submitted, accepted.get());
+      log.debug("{} Waiting to delete table locations:{} operations:{}  
submitted:{} accepted:{}",
+          FateTxId.formatTid(tid), locations, otherOps, submitted, 
accepted.get());
       return Math.min(Math.max(100, tabletsSeen), 30000);
     }
 

Reply via email to