jtuglu-netflix commented on code in PR #18162:
URL: https://github.com/apache/druid/pull/18162#discussion_r2157937841


##########
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:
   Yeah, sounds good. I think it's fair to put a note about this since it's not 
immediately obvious. Also since we're relying on it being non-negative below:
   
   ```java
   ...
   - replicaCountOnTier.moveCompletedPendingDrop();
   ...
   ```
   
   having a negative could result in an inflated `projectedReplicas`, which is 
the behavior this PR is trying to fix.



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