github-advanced-security[bot] commented on code in PR #16768:
URL: https://github.com/apache/druid/pull/16768#discussion_r1739904356


##########
server/src/main/java/org/apache/druid/server/compaction/CompactionSegmentSearchPolicy.java:
##########
@@ -38,6 +45,18 @@
   CompactionSegmentIterator createIterator(
       Map<String, DataSourceCompactionConfig> compactionConfigs,
       Map<String, SegmentTimeline> dataSources,
-      Map<String, List<Interval>> skipIntervals
+      Map<String, List<Interval>> skipIntervals,
+      CompactionStatusTracker statusTracker
+  );
+
+  /**
+   * Checks if the given candidate segments are eligible for compaction in
+   * the current iteration. A policy implementation may implement this method
+   * to avoid compacting intervals that do not fulfil some required criteria.
+   */
+  boolean isEligibleForCompaction(
+      SegmentsToCompact candidateSegments,
+      CompactionStatus currentCompactionStatus,

Review Comment:
   ## Useless parameter
   
   The parameter 'currentCompactionStatus' is never used.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/7760)



##########
server/src/main/java/org/apache/druid/server/compaction/CompactionSegmentSearchPolicy.java:
##########
@@ -38,6 +45,18 @@
   CompactionSegmentIterator createIterator(
       Map<String, DataSourceCompactionConfig> compactionConfigs,
       Map<String, SegmentTimeline> dataSources,
-      Map<String, List<Interval>> skipIntervals
+      Map<String, List<Interval>> skipIntervals,
+      CompactionStatusTracker statusTracker
+  );
+
+  /**
+   * Checks if the given candidate segments are eligible for compaction in
+   * the current iteration. A policy implementation may implement this method
+   * to avoid compacting intervals that do not fulfil some required criteria.
+   */
+  boolean isEligibleForCompaction(
+      SegmentsToCompact candidateSegments,
+      CompactionStatus currentCompactionStatus,
+      CompactionTaskStatus latestTaskStatus

Review Comment:
   ## Useless parameter
   
   The parameter 'latestTaskStatus' is never used.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/7761)



##########
server/src/main/java/org/apache/druid/server/compaction/CompactionSegmentSearchPolicy.java:
##########
@@ -38,6 +45,18 @@
   CompactionSegmentIterator createIterator(
       Map<String, DataSourceCompactionConfig> compactionConfigs,
       Map<String, SegmentTimeline> dataSources,
-      Map<String, List<Interval>> skipIntervals
+      Map<String, List<Interval>> skipIntervals,
+      CompactionStatusTracker statusTracker
+  );
+
+  /**
+   * Checks if the given candidate segments are eligible for compaction in
+   * the current iteration. A policy implementation may implement this method
+   * to avoid compacting intervals that do not fulfil some required criteria.
+   */
+  boolean isEligibleForCompaction(
+      SegmentsToCompact candidateSegments,

Review Comment:
   ## Useless parameter
   
   The parameter 'candidateSegments' is never used.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/7759)



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

Reply via email to