This is an automated email from the ASF dual-hosted git repository. kturner pushed a commit to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/elasticity by this push: new f05e44335b forgo fabricating fake fateid for system compation (#4392) f05e44335b is described below commit f05e44335be91fc60097d336b98b3eed7f979a5c Author: Keith Turner <ktur...@apache.org> AuthorDate: Sat Mar 16 14:52:44 2024 -0400 forgo fabricating fake fateid for system compation (#4392) --- .../manager/compaction/coordinator/CompactionCoordinator.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java b/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java index 174d741abb..178b4f1e95 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java @@ -42,7 +42,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Optional; import java.util.Set; -import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.ScheduledThreadPoolExecutor; @@ -584,8 +583,11 @@ public class CompactionCoordinator dfv.getTime()); }).collect(toList()); - FateInstanceType type = FateInstanceType.fromTableId(metaJob.getTabletMetadata().getTableId()); - FateId fateId = FateId.from(type, UUID.randomUUID()); + // The fateId here corresponds to the Fate transaction that is driving a user initiated + // compaction. A system initiated compaction has no Fate transaction driving it so its ok to set + // it to null. If anything tries to use the id for a system compaction and triggers a NPE it's + // probably a bug that needs to be fixed. + FateId fateId = null; if (metaJob.getJob().getKind() == CompactionKind.USER) { fateId = metaJob.getTabletMetadata().getSelectedFiles().getFateId(); } @@ -593,7 +595,8 @@ public class CompactionCoordinator return new TExternalCompactionJob(externalCompactionId, metaJob.getTabletMetadata().getExtent().toThrift(), files, iteratorSettings, ecm.getCompactTmpName().getNormalizedPathStr(), ecm.getPropagateDeletes(), - TCompactionKind.valueOf(ecm.getKind().name()), fateId.toThrift(), overrides); + TCompactionKind.valueOf(ecm.getKind().name()), fateId == null ? null : fateId.toThrift(), + overrides); } @Override