keith-turner commented on code in PR #5290:
URL: https://github.com/apache/accumulo/pull/5290#discussion_r1932941496


##########
core/src/main/java/org/apache/accumulo/core/metadata/TabletState.java:
##########
@@ -34,18 +39,25 @@ public static TabletState compute(TabletMetadata tm, 
Set<TServerInstance> liveTS
       future = tm.getLocation();
     }
     if (future != null) {
-      return liveTServers.contains(future.getServerInstance()) ? 
TabletState.ASSIGNED
-          : TabletState.ASSIGNED_TO_DEAD_SERVER;
+      return trace(liveTServers.contains(future.getServerInstance()) ? 
TabletState.ASSIGNED
+          : TabletState.ASSIGNED_TO_DEAD_SERVER, tm);
     } else if (current != null) {
       if (liveTServers.contains(current.getServerInstance())) {
-        return TabletState.HOSTED;
+        return trace(TabletState.HOSTED, tm);
       } else {
-        return TabletState.ASSIGNED_TO_DEAD_SERVER;
+        return trace(TabletState.ASSIGNED_TO_DEAD_SERVER, tm);
       }
     } else if (tm.getSuspend() != null) {
-      return TabletState.SUSPENDED;
+      return trace(TabletState.SUSPENDED, tm);
     } else {
-      return TabletState.UNASSIGNED;
+      return trace(TabletState.UNASSIGNED, tm);
     }
   }
+
+  private static TabletState trace(TabletState tabletState, TabletMetadata tm) 
{
+    // The prev row column for the table may not have been fetched so can not 
call tm.getExtent()
+    log.trace("Computed state of {} for {}", tabletState,
+        TabletsSection.encodeRow(tm.getTableId(), tm.getEndRow()));

Review Comment:
   Updated in 74efc33988fa97992facb29461b032a63c91758c.  Also updated 
TabletGoalState as it had the same problem.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to