github-advanced-security[bot] commented on code in PR #19016:
URL: https://github.com/apache/druid/pull/19016#discussion_r2798162562
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/NativeCompactionRunner.java:
##########
@@ -140,18 +172,33 @@
CompactionIOConfig compactionIOConfig
)
{
- if (!compactionIOConfig.isAllowNonAlignedInterval()) {
- // Validate interval alignment.
+ // Resolve specific segment IDs for minor compaction if using
SpecificSegmentsSpec
+ final List<WindowedSegmentId> segmentIds = resolveSegmentIdsForInterval(
+ compactionIOConfig.getInputSpec(),
+ dataSchema.getDataSource(),
+ interval
+ );
+
+ final Interval inputInterval;
+ if (segmentIds != null && !segmentIds.isEmpty()) {
+ // When compacting specific segments, use segment IDs instead of interval
+ inputInterval = null;
+ } else {
+ inputInterval = interval;
+ }
+
+ if (inputInterval != null &&
!compactionIOConfig.isAllowNonAlignedInterval()) {
Review Comment:
## Deprecated method or constructor invocation
Invoking [CompactionIOConfig.isAllowNonAlignedInterval](1) should be avoided
because it has been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/10814)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]