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


##########
server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java:
##########
@@ -429,6 +429,19 @@ private TableMgmtStats 
manageTablets(Iterator<TabletManagement> iter,
       SortedMap<TServerInstance,TabletServerStatus> currentTServers, boolean 
isFullScan)
       throws TException, DistributedStoreException, WalMarkerException, 
IOException {
 
+    // When upgrading the Manager needs the TabletGroupWatcher
+    // to assign and balance the root and metadata tables, but
+    // the Manager does not fully start up until the upgrade
+    // is complete. This means that objects like the Splitter
+    // are not going to be initialized and the Coordinator
+    // is not going to be started.
+    final boolean currentlyUpgrading = manager.isUpgrading();
+    if (currentlyUpgrading) {
+      LOG.debug(
+          "Currently upgrading, splits and compactions for tables in level {} 
will occur once upgrade is completed.",
+          store.getLevel());

Review Comment:
   That tablet group watcher code is long and complex.  Could possibly pull all 
the upgrade related code into a single place within the TGW by filtering the 
actions.  This would avoid having the checks for upgrading spread across three 
places in this long method.  Also wondering if we could somehow only log when 
there are splits or compactions being requested.
   
   ```suggestion
       if (currentlyUpgrading) {
          // filter out compaction and split actions when upgrading
          actions = actions.stream().filter(a->a!=NEEDS_COMPACTING && 
a!=NEEDS_SPLITTING).collect(toSet());
          // could we only log this when there are actually split or compaction 
actions that were filtered?
         LOG.debug(
             "Currently upgrading, splits and compactions for tables in level 
{} will occur once upgrade is completed.",
             store.getLevel());
   ```



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