keith-turner commented on code in PR #5070:
URL: https://github.com/apache/accumulo/pull/5070#discussion_r1844200328
##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -1057,11 +1059,29 @@ private long balanceTablets() {
int attemptNum = 0;
do {
log.debug("Balancing for tables at level {}, times-in-loop: {}", dl,
++attemptNum);
- params = BalanceParamsImpl.fromThrift(tserverStatusForBalancerLevel,
- tserverStatusForLevel, partitionedMigrations.get(dl));
+
+ SortedMap<TabletServerId,TServerStatus> statusForBalancerLevel =
+ tserverStatusForBalancerLevel;
+ if (attemptNum % checkInterval == 0) {
Review Comment:
Instead of adding this check, what about instead replacing the do/while loop
with a break out of the for loop. I think the loop is intended to prevent
balancing of user tablets when metadata is not balanced. This also seems to
prevent other work that a thread that calls balancing is doing. This change
redoing a subset of that work here. If the function returned instead of
looping it would allow that work to be done.
Wondering if we could do something like the following at this
[line](https://github.com/apache/accumulo/blob/8f52dd10f7cbfef192c9cc431543619b7072139a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java#L1073)
instead of the while loop.
```java
if(migrationsOutForLevel > 0 && (dl == DataLevel.ROOT || dl ==
DataLevel.METADATA)){
// do not continue balancing later levels until this level is balanced.
break;
}
```
Then maybe the outer code/thread will do its thing and eventually call
balanceTablets again and maybe get further down the levels.
--
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]