Add option for balancing a single table at a time to the host regex balancer
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 487
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 13
Description
**Is your feature request related to a problem? Please describe.**
The host regex balancer calls multiple per table balancers. Each per table balancer may make balancing decision based on the current state of its tablets and the current state of all other tablets. When the decision of multiple per table balancers are all executed at once it may cause churn because their assumptions about other tables are partially invalidated. If the host regex balancer could optionally focus on one table at a time it may help avoid or lessen this churn.
**Describe the solution you'd like**
Add option to the host reg ex balancer that enables balancing a single table at time. This option would be off by default. The behavior of this option would be as follows for this [code section](https://github.com/apache/accumulo/blob/c488f788ad3add4992c30556d7b5bc941d6f0a39/core/src/main/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java#L496-L523).
* If there are migrations in progress let them complete, so return.
* Sort the table ids. This will ensure that as the balancer is repeatedly called that it works through tables in a consistent order.
* Call the balancer for each table until a per table balancer returns migrations.
* Return after the first table returns some migrations, do not consult any other per table balancers.
Need to experiment with this solution to see if it helps with churn.
Contributor guide
Research direction
Start in core/src/main/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java around the linked section at lines 496-523. Trace how per-table balancers are called, then implement the optional single-table mode with the stated migration and sorted-table behavior, disabled by default. Validate whether the experiment reduces balancing churn.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100