dlmarion commented on code in PR #3872:
URL: https://github.com/apache/accumulo/pull/3872#discussion_r1370489740


##########
server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementIterator.java:
##########
@@ -429,20 +429,33 @@ protected void consume() throws IOException {
           TabletManagement.CONFIGURED_COLUMNS, false, true);
 
       actions.clear();
-      if (managerState != ManagerState.NORMAL || current.isEmpty() || 
onlineTables.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);
-        computeTabletManagementActions(tm, actions);
+      Exception error = null;
+      try {
+        if (managerState != ManagerState.NORMAL || current.isEmpty() || 
onlineTables.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);
+          computeTabletManagementActions(tm, actions);
+        }
+      } catch (Exception e) {
+        LOG.error("Error computing tablet management actions for extent: {}", 
tm.getExtent(), e);
+        error = e;
       }
 
-      if (!actions.isEmpty()) {
-        // If we simply returned here, then the client would get the encoded 
K,V
-        // from the WholeRowIterator. However, it would not know the reason(s) 
why
-        // it was returned. Insert a K,V pair to represent the reasons. The 
client
-        // can pull this K,V pair from the results by looking at the colf.
-        TabletManagement.addActions(decodedRow, actions);
+      if (!actions.isEmpty() || error != null) {
+        if (error != null) {
+          // Insert the error into K,V pair representing
+          // the tablet metadata.
+          TabletManagement.addError(decodedRow, error);
+        }
+        if (!actions.isEmpty()) {

Review Comment:
   Looks like TabletGroupWatcher will not process the actions for a Tablet when 
there is an error, so I'm good with making this change.



-- 
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