keith-turner commented on code in PR #4861:
URL: https://github.com/apache/accumulo/pull/4861#discussion_r1759093679
##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -640,26 +640,25 @@ private class ScanServerZKCleaner implements Runnable {
public void run() {
final ZooReaderWriter zrw = getContext().getZooReaderWriter();
- final String sserverZNodePath = getContext().getZooKeeperRoot() +
Constants.ZSSERVERS;
while (stillManager()) {
try {
- for (String sserverClientAddress :
zrw.getChildren(sserverZNodePath)) {
+ Set<ServiceLockPath> scanServerPaths =
+ getContext().getServerPaths().getScanServer(Optional.empty(),
Optional.empty());
+ for (ServiceLockPath path : scanServerPaths) {
- final String sServerZPath = sserverZNodePath + "/" +
sserverClientAddress;
- final var zLockPath = ServiceLock.path(sServerZPath);
ZcStat stat = new ZcStat();
Optional<ServiceLockData> lockData =
- ServiceLock.getLockData(getContext().getZooCache(), zLockPath,
stat);
+ ServiceLock.getLockData(getContext().getZooCache(), path,
stat);
if (lockData.isEmpty()) {
try {
- log.debug("Deleting empty ScanServer ZK node {}",
sServerZPath);
- zrw.delete(sServerZPath);
+ log.debug("Deleting empty ScanServer ZK node {}", path);
Review Comment:
Opened #4882 and #4883 about this empty cleanup code.
--
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]