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


##########
server/src/main/java/org/apache/druid/server/coordinator/duty/CloneHistoricals.java:
##########
@@ -110,15 +113,19 @@ public DruidCoordinatorRuntimeParams 
run(DruidCoordinatorRuntimeParams params)
         continue;
       }
 
+      final CloningStats cloningStats = new 
CloningStats(sourceServer.getServer().getNumSegments());
+      targetHistoricalStats.put(targetHistoricalName, cloningStats);
+
       final Set<DataSegment> sourceProjectedSegments = 
sourceServer.getProjectedSegments();
       final Set<DataSegment> targetProjectedSegments = 
targetServer.getProjectedSegments();
       // Load any segment that the clone target is missing, or that it holds 
under a different partial-load profile
       // than the source. Segment identity alone can't tell those apart: two 
replicas of the same segment id may hold
       // different parts of it.
       for (DataSegment segment : sourceProjectedSegments) {
         final PartialLoadProfile sourceProfile = 
sourceServer.getProjectedProfile(segment);
-        if (shouldLoadSegmentOnTargetServer(segment, sourceProfile, 
targetServer, targetProjectedSegments)) {
-          loadSegmentOnTargetServer(segment, sourceProfile, targetServer, 
params);
+        if (shouldLoadSegmentOnTargetServer(segment, sourceProfile, 
targetServer, targetProjectedSegments)
+            && loadSegmentOnTargetServer(segment, sourceProfile, targetServer, 
params)) {

Review Comment:
   Yeah, I originally had that check but it got replaced in some later commits. 
I have simplified it now.



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