kfaraz commented on code in PR #19179:
URL: https://github.com/apache/druid/pull/19179#discussion_r2958382490


##########
indexing-service/src/main/java/org/apache/druid/indexing/compact/OverlordCompactionScheduler.java:
##########
@@ -370,45 +378,56 @@ private synchronized void scheduledRun()
   }
 
   /**
-   * Creates and launches eligible compaction jobs.
+   * Creates a new compaction job queue and enqueues eligible jobs.
+   * In dry run mode, no jobs are launched and no metrics are emitted but 
detailed stats are collected.
    */
-  private synchronized void resetCompactionJobQueue()
+  private synchronized void resetCompactionJobQueue(
+      boolean dryRun,
+      ClusterCompactionConfig clusterCompactionConfig,
+      @Nullable CompactionStatusDetailedStats detailedStats
+  )
   {
-    // Remove the old queue so that no more jobs are added to it
-    latestJobQueue.set(null);
-
-    final Stopwatch runDuration = Stopwatch.createStarted();
-    final DataSourcesSnapshot dataSourcesSnapshot = getDatasourceSnapshot();
-    final CompactionJobQueue queue = new CompactionJobQueue(
-        dataSourcesSnapshot,
-        getLatestClusterConfig(),
-        statusTracker,
-        taskActionClientFactory,
-        taskLockbox,
-        overlordClient,
-        brokerClient,
-        objectMapper,
-        indexingStateStorage,
-        indexingStateCache
-    );
-    latestJobQueue.set(queue);
+    synchronized (lock) {

Review Comment:
   Please don't add another lock, this method is already `synchronized`. We 
shouldn't need to update the prod flow methods anyway.



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