capistrant commented on code in PR #18844:
URL: https://github.com/apache/druid/pull/18844#discussion_r2623961958


##########
indexing-service/src/main/java/org/apache/druid/indexing/compact/CompactionConfigBasedJobTemplate.java:
##########
@@ -70,12 +73,34 @@ public List<CompactionJob> createCompactionJobs(
 
     final List<CompactionJob> jobs = new ArrayList<>();
 
+    CompactionState compactionState = 
CompactSegments.createCompactionStateFromConfig(config);
+
+    String compactionStateFingerprint = 
CompactionState.generateCompactionStateFingerprint(
+        compactionState,
+        config.getDataSource()
+    );
+
+    if (segmentIterator.hasNext()) {
+      // If we are going to create compaction jobs for this compaction state, 
we need to persist the fingerprint -> state
+      // mapping so compacted segments from these jobs can reference a valid 
compaction state.
+      params.getCompactionStateManager().persistCompactionState(

Review Comment:
   thank you for the guidance. Will work on how to get this out of hot path



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