keith-turner commented on code in PR #4767:
URL: https://github.com/apache/accumulo/pull/4767#discussion_r1693586887


##########
server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java:
##########
@@ -1070,21 +1071,30 @@ private void cleanUpCompactors() {
       var groups = zoorw.getChildren(compactorQueuesPath);
 
       for (String group : groups) {
-        String qpath = compactorQueuesPath + "/" + group;
-
-        var compactors = zoorw.getChildren(qpath);
+        final String qpath = compactorQueuesPath + "/" + group;
+        final CompactorGroupId cgid = CompactorGroupId.of(group);
+        final var compactors = zoorw.getChildren(qpath);
 
         if (compactors.isEmpty()) {
           deleteEmpty(zoorw, qpath);
-        }
-
-        for (String compactor : compactors) {
-          String cpath = compactorQueuesPath + "/" + group + "/" + compactor;
-          var lockNodes = zoorw.getChildren(compactorQueuesPath + "/" + group 
+ "/" + compactor);
-          if (lockNodes.isEmpty()) {
-            deleteEmpty(zoorw, cpath);
+          // Group has no compactors, we can clear its
+          // associated priority queue of jobs
+          getJobQueues().getQueue(cgid).clear();

Review Comment:
   Its possible that a queue may not exists, so this could throw an NPE.  If a 
job has never been added for a group then the queue will not exists.



-- 
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]

Reply via email to