dlmarion commented on code in PR #5530:
URL: https://github.com/apache/accumulo/pull/5530#discussion_r2102767209
##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -1918,10 +1918,20 @@ public boolean isUpgrading() {
}
void initializeBalancer() {
- var localTabletBalancer =
Property.createInstanceFromPropertyName(getConfiguration(),
- Property.MANAGER_TABLET_BALANCER, TabletBalancer.class, new
TableLoadBalancer());
- localTabletBalancer.init(balancerEnvironment);
- tabletBalancer = localTabletBalancer;
+ try {
+ getContext().getPropStore().getCache().removeAll();
Review Comment:
I commented out the two cache invalidation lines and I think I found the
issue. When BrokenBalancerIT changes the system property to use the broken
balancer
[here](https://github.com/apache/accumulo/blob/2.1/test/src/main/java/org/apache/accumulo/test/BrokenBalancerIT.java#L115),
it ends up calling code
[here](https://github.com/apache/accumulo/blob/2.1/test/src/main/java/org/apache/accumulo/test/BrokenBalancerIT.java#L115)
that changes the property in ZooKeeper, then calls `updatePlugins` which calls
`initializeBalancer`. If you look at the log messages (below), you will see
that the property being set, then the watcher firing that puts a Runnable on
the ExecutorService, then the balancer being initialized, then the Runnable
executing to update the internal state.
```
2025-05-22T14:37:46,138 71 [impl.ZooPropStore] TRACE: mutateVersionedProps
called for: SystemPropKey{InstanceId=a40ea124-8c5a-45ac-b54f-07fcde3a0f33}
2025-05-22T14:37:46,140 28 [impl.PropStoreWatcher] TRACE: handle change
event for path: /accumulo/a40ea124-8c5a-45ac-b54f-07fcde3a0f33/config
2025-05-22T14:37:46,140 28 [impl.PropStoreWatcher] TRACE: signal ZooKeeper
change event: SystemPropKey{InstanceId=a40ea124-8c5a-45ac-b54f-07fcde3a0f33}
2025-05-22T14:37:46,140 28 [impl.PropStoreWatcher] TRACE: Sending change
event to: [org.apache.accumulo.server.conf.util.PropSnapshot@67d0f15a,
org.apache.accumulo.server.conf.store.impl.ZooPropStore@5dbf0508]
2025-05-22T14:37:46,140 71 [conf.SystemConfiguration] TRACE: system config
get() - property request for manager.tablet.balancer
2025-05-22T14:37:46,140 71 [manager.Manager] DEBUG: Attempting to
reinitialize balancer using class
org.apache.accumulo.core.spi.balancer.TableLoadBalancer
2025-05-22T14:37:46,140 71 [conf.SystemConfiguration] TRACE: system config
get() - property request for manager.tablet.balancer
2025-05-22T14:37:46,140 71 [manager.Manager] INFO : tablet balancer changed
to org.apache.accumulo.core.spi.balancer.TableLoadBalancer
2025-05-22T14:37:46,140 169 [util.PropSnapshot] DEBUG: Saw zk change event
for SystemPropKey{InstanceId=a40ea124-8c5a-45ac-b54f-07fcde3a0f33} - update
properties required
2025-05-22T14:37:46,140 169 [impl.ZooPropStore] TRACE: Received change event
from ZooKeeper for:
SystemPropKey{InstanceId=a40ea124-8c5a-45ac-b54f-07fcde3a0f33} removed from
cache
```
--
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]