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 4e1b052904 always sets needs recovery flag in tablet mgmt iterator 
(#4255)
4e1b052904 is described below

commit 4e1b0529043f8359cae8929e427c4c156ebefaf6
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Wed Feb 14 17:13:18 2024 -0500

    always sets needs recovery flag in tablet mgmt iterator (#4255)
    
    This commit fixes #4251.  The WalSunnyDayIT was failing because the root
    tablet needed recovery, but the tablet mgmt iterator was not indicating
    this because the manager was in safe mode.  Therefore recovery never
    happened and the test timed out.
---
 .../server/manager/state/TabletManagementIterator.java | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementIterator.java
 
b/server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementIterator.java
index 4e7bca7287..69fbbdd1b0 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementIterator.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementIterator.java
@@ -201,14 +201,18 @@ public class TabletManagementIterator extends 
SkippingIterator {
       actions.clear();
       Exception error = null;
       try {
-        if (tabletMgmtParams.getManagerState() != ManagerState.NORMAL
-            || tabletMgmtParams.getOnlineTsevers().isEmpty()
-            || tabletMgmtParams.getOnlineTables().isEmpty()) {
-          // when manager is in the process of starting up or shutting down 
return everything.
-          actions.add(ManagementAction.NEEDS_LOCATION_UPDATE);
-        } else {
-          LOG.trace("Evaluating extent: {}", tm);
+        LOG.trace("Evaluating extent: {}", tm);
+        if (tm.getExtent().isMeta()) {
           computeTabletManagementActions(tm, actions);
+        } else {
+          if (tabletMgmtParams.getManagerState() != ManagerState.NORMAL
+              || tabletMgmtParams.getOnlineTsevers().isEmpty()
+              || tabletMgmtParams.getOnlineTables().isEmpty()) {
+            // when manager is in the process of starting up or shutting down 
return everything.
+            actions.add(ManagementAction.NEEDS_LOCATION_UPDATE);
+          } else {
+            computeTabletManagementActions(tm, actions);
+          }
         }
       } catch (Exception e) {
         LOG.error("Error computing tablet management actions for extent: {}", 
tm.getExtent(), e);

Reply via email to