This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push:
new 554d0b23c6 fixes bug where external compaction never starts (#5707)
554d0b23c6 is described below
commit 554d0b23c66b48f889678590855815f05c471077
Author: Keith Turner <[email protected]>
AuthorDate: Wed Jul 2 15:36:30 2025 -0400
fixes bug where external compaction never starts (#5707)
Ran into an issue when running random walk bulk test where a compaction
that needed to happen was never running. The code fixed in this PR used
to change the state to running and then forget about it in some cases.
However [this code][1] would still remember it. That would cause this
[this code][2] to filter out planned jobs when there were running
compactions in submitted jobs. Hopefully this change will cause [this
code][3] to filter this from submitted jobs.
[1]:https://github.com/apache/accumulo/blob/5bba2f3cf36717d0e2fabbf4abb93c3455c0619e/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionService.java#L84
[2]:https://github.com/apache/accumulo/blob/5bba2f3cf36717d0e2fabbf4abb93c3455c0619e/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionService.java#L186
[3]:https://github.com/apache/accumulo/blob/5bba2f3cf36717d0e2fabbf4abb93c3455c0619e/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionService.java#L359-L365
---
.../accumulo/tserver/compactions/ExternalCompactionExecutor.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/ExternalCompactionExecutor.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/ExternalCompactionExecutor.java
index 1c717a142a..4b3373ca14 100644
---
a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/ExternalCompactionExecutor.java
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/ExternalCompactionExecutor.java
@@ -174,6 +174,11 @@ public class ExternalCompactionExecutor implements
CompactionExecutor {
var ecj = extJob.compactable.reserveExternalCompaction(extJob.csid,
extJob.getJob(),
compactorId, externalCompactionId);
if (ecj == null) {
+ // No job could be reserved. This class will no longer have a
reference to extJob
+ // however CompactionService may in its submittedJobs set. Mark
the job as something
+ // other than RUNNING so that CompactionService will eventually
discard it from the
+ // submitted jobs it is tracking.
+ extJob.status.compareAndSet(Status.RUNNING, Status.FAILED);
break;
} else {
extJob.ecid = ecj.getExternalCompactionId();