mirror of
https://github.com/apache/druid.git
synced 2025-02-26 04:55:24 +00:00
Fix NPE in CompactSegments (#16713)
This commit is contained in:
parent
7c625356c5
commit
616ae631c6
@ -234,12 +234,13 @@ public class CompactSegments implements CoordinatorCustomDuty
|
||||
Granularity configuredSegmentGranularity = dataSourceCompactionConfig.getGranularitySpec()
|
||||
.getSegmentGranularity();
|
||||
Granularity taskSegmentGranularity = compactionTaskQuery.getGranularitySpec().getSegmentGranularity();
|
||||
if (configuredSegmentGranularity.equals(taskSegmentGranularity)) {
|
||||
if (configuredSegmentGranularity == null
|
||||
|| configuredSegmentGranularity.equals(taskSegmentGranularity)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LOG.info(
|
||||
"Cancelling task [%s] as task segmentGranularity is [%s] but compaction config segmentGranularity is [%s]",
|
||||
"Cancelling task[%s] as task segmentGranularity[%s] differs from compaction config segmentGranularity[%s].",
|
||||
compactionTaskQuery.getId(), taskSegmentGranularity, configuredSegmentGranularity
|
||||
);
|
||||
overlordClient.cancelTask(compactionTaskQuery.getId());
|
||||
|
Loading…
x
Reference in New Issue
Block a user