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


##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -976,31 +966,37 @@ private long balanceTablets() {
             tserverStatusForLevel, partitionedMigrations.get(dl), dl, 
getTablesForLevel(dl));
         wait = Math.max(tabletBalancer.balance(params), wait);
         long migrationsOutForLevel = 0;
-        for (TabletMigration m : 
checkMigrationSanity(statusForBalancerLevel.keySet(),
-            params.migrationsOut(), dl)) {
-          final KeyExtent ke = KeyExtent.fromTabletId(m.getTablet());
-          if (partitionedMigrations.get(dl).contains(ke)) {
-            log.warn("balancer requested migration more than once, skipping 
{}", m);
-            continue;
+        try (
+            var tabletsMutator = 
getContext().getAmple().conditionallyMutateTablets(result -> {})) {
+          for (TabletMigration m : 
checkMigrationSanity(statusForBalancerLevel.keySet(),
+              params.migrationsOut(), dl)) {
+            final KeyExtent ke = KeyExtent.fromTabletId(m.getTablet());
+            if (partitionedMigrations.get(dl).contains(ke)) {
+              log.warn("balancer requested migration more than once, skipping 
{}", m);
+              continue;
+            }
+            migrationsOutForLevel++;
+            tabletsMutator.mutateTablet(ke).requireAbsentOperation()

Review Comment:
   Implemented `requireCurrentLocationNotEqualTo`. Please take a look at the 
new `CurrentLocationNotEqualToIterator` class



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