cshannon commented on issue #4209:
URL: https://github.com/apache/accumulo/issues/4209#issuecomment-1925875714
I took a look at fixing this today and I still could not get the Manager to
shutdown when the Tservers are offline. I tried the following to try and make
it shutdown but this did not work:
```java
public void shutdown() {
keepRunning.set(false);
fatePoolWatcher.shutdownNow();
try {
if (executor != null) {
executor.shutdown();
if (!executor.awaitTermination(5, SECONDS)) {
executor.shutdownNow();
}
}
while (workFinder.isAlive()) {
workFinder.interrupt();
workFinder.join(100);
}
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
```
I was hoping by calling shtudown now on the executors and then interrupting
in a loop it would stop always but it still was hung on the same threads trying
to scan.
The test itself could be fixed by simply not shutting down the Tservers
until after the Manager shuts down but that doesn't help if the Manager and
Tservers go offline in a real cluster at the same time (Manager can't talk to
the Tservers when shutting down).
One option could be to set a timeout in TabletServerBatchReaderIterator on
the scan to make sure it doesn't wait forever but not sure if that's a great
idea.
--
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]