kevinrr888 commented on code in PR #5416:
URL: https://github.com/apache/accumulo/pull/5416#discussion_r2021449267


##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -984,23 +1031,23 @@ private long balanceTablets() {
             continue;
           }
           migrationsOutForLevel++;
-          migrations.put(ke, 
TabletServerIdImpl.toThrift(m.getNewTabletServer()));
+          getContext().getAmple().mutateTablet(ke)
+              
.putMigration(TabletServerIdImpl.toThrift(m.getNewTabletServer())).mutate();
           log.debug("migration {}", m);
         }
         totalMigrationsOut += migrationsOutForLevel;
 
         // increment this at end of loop to signal complete run w/o any 
continue
         levelsCompleted++;
       }
-      balancerMetrics.assignMigratingCount(migrations::size);
+      balancerMetrics.assignMigratingCount(Manager.this::numMigrations);

Review Comment:
   Calculate total from existing values instead of rescanning the metadata



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