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


##########
server/src/main/java/org/apache/druid/server/coordinator/duty/CloneHistoricals.java:
##########
@@ -239,10 +265,12 @@ private Map<String, ServerCloneStatus> 
createCurrentStatusMap(
       if (targetServer == null) {
         newStatus = ServerCloneStatus.unknown(sourceServerName, 
targetServerName);
       } else {
-
         ServerCloneStatus.State state;
+        final CloningStats stats = 
targetHistoricalStats.getOrDefault(targetServerName, new CloningStats(0));
         if (!historicalMap.containsKey(sourceServerName)) {
           state = ServerCloneStatus.State.SOURCE_SERVER_MISSING;

Review Comment:
   `ServerCloneStatus.unknown` internally seems to use the state enum 
`TARGET_SERVER_MISSING`.
   So the two cases already seem equivalent in terms of the state returned to 
the user.
   It still seems useful to track the bytes/segments to load in the case with 
source missing since it gives an idea of what the clone is currently doing and 
where it would pick from if the source server happens to come back.
   
   Please let me know if this makes sense, and if we should advertise some 
other state here instead.



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