jtuglu1 commented on code in PR #19679:
URL: https://github.com/apache/druid/pull/19679#discussion_r3572498089


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentTransactionalReplaceAction.java:
##########
@@ -209,49 +212,47 @@ void registerUpgradedPendingSegmentsOnSupervisor(
       return;
     }
 
-    // Register each upgraded pending segment on the supervisor and summarize 
the batch. The per-segment mapping is
-    // unbounded (a broad REPLACE can upgrade thousands of segments), so INFO 
carries aggregate counts plus a bounded
-    // sample and the full mapping is materialized only when DEBUG is enabled.
-    final boolean debugEnabled = log.isDebugEnabled();
-    final Map<String, Integer> notifiedTasksSample = new LinkedHashMap<>();
-    final Map<String, Integer> notifiedTasksBySegment = debugEnabled ? new 
LinkedHashMap<>() : null;
-    int registeredSegments = 0;
-    int totalNotifiedTasks = 0;
+    // Try to register the upgraded pending segments with all eligible 
supervisors
+    // Only the supervisor which owns a pending segment will actually register 
it
+    for (String supervisorId : activeSupervisorIdWithAppendLock) {
+      registerUpgradedPendingSegmentOnSupervisor(task, toolbox, 
upgradedPendingSegments, supervisorId);

Review Comment:
   can this throw?



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