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


##########
server/src/main/java/org/apache/druid/server/coordinator/loading/SegmentReplicaCount.java:
##########
@@ -110,7 +114,12 @@ int loading()
 
   int moving()
   {
-    return moving;
+    return movingTo;
+  }
+
+  int moveCompletedPendingDrop()
+  {
+    return movingFrom - movingTo;

Review Comment:
   It will be never be less than 0.
   But we could still do a `Math.max(0, movingFrom - movingTo)` to be on the 
safe side.
   I don't want to add an assert here since it is a critical 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