This is an automated email from the ASF dual-hosted git repository. ddanielr pushed a commit to branch 3.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/3.1 by this push: new cfb4563cf6 Fix Manager hanging on shutdown command (#5085) cfb4563cf6 is described below commit cfb4563cf64c67f9de2ec81795827607dbcf22e2 Author: Daniel Roberts <ddani...@gmail.com> AuthorDate: Wed Nov 20 20:00:05 2024 +0000 Fix Manager hanging on shutdown command (#5085) The status thread would always cancel tasks once the timer reached max wait and never remove them from the list of tasks. This causes the Update Status thread to wait indefinitely when calling gatherTableInformation. --- .../src/main/java/org/apache/accumulo/manager/Manager.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java b/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java index ba4883ee42..0a598712ad 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java @@ -1190,12 +1190,10 @@ public class Manager extends AbstractServer Iterator<Future<?>> iter = tasks.iterator(); while (iter.hasNext()) { Future<?> f = iter.next(); - if (cancel) { + if (f.isDone()) { + iter.remove(); + } else if (cancel) { f.cancel(true); - } else { - if (f.isDone()) { - iter.remove(); - } } } Uninterruptibles.sleepUninterruptibly(1, MILLISECONDS);