-
Notifications
You must be signed in to change notification settings - Fork 478
Description
Describe the bug
Attempting to use the prune function of accumulo-cluster does not work with scan servers.
This bug appears to be due to the format of scan server locks which are not stored under a group definition.
/accumulo/<ID>/sservers/localhost:10000 instead of /accumulo/<ID>/sservers/default/localhost:10000.
get /accumulo/a4e0f091-7082-40e3-b0fb-7d5db969fa8f/sservers/localhost:10004/zlock#47f1c5b2-c731-44f1-bbaf-830535e75d23#0000000000
47f1c5b2-c731-44f1-bbaf-830535e75d23,test1
The code that is used for removing the scan servers locks is calling removeGroupedLocks which applies the group predicate to the scan server HostAndPort instead of looking for the group ID in the scan server lock.
| removeGroupedLocks(zoo, sserversPath, groupPredicate, hostPortPredicate, opts); |
| ZooZap.removeGroupedLocks(zk, sserversPath, rg -> true, hostAndPort::contains, opts); |
Versions (OS, Maven, Java, and others, as appropriate):
- Affected version(s) of this project: [e.g. 1.10.0] 2.1.4
To Reproduce
Steps to reproduce the behavior (or a link to an example repository that reproduces the problem):
- Modify cluster.yaml to start scan servers under the default and other group names and set the expected number per host to 2.
- run accumulo-cluster start --sservers
- Modify the sservers_per_host property to 1.
- run
accumulo-cluster prune --sserversoraccumulo-cluster prune --sservers --group=default
Expected behavior
scan server locks are removed for the pruned groups.
Additional context
Not sure if this problem also exists in main as resource groups are used by all server types.