github-code-scanning[bot] commented on code in PR #14584:
URL: https://github.com/apache/druid/pull/14584#discussion_r1263339157
##########
server/src/main/java/org/apache/druid/server/coordinator/balancer/TierSegmentBalancer.java:
##########
@@ -221,4 +225,44 @@
runStats.add(Stats.Segments.MOVE_SKIPPED, key, 1);
}
+ private int getSegmentsToMove(int maxSegmentsToMove)
+ {
+ // If smartSegmentLoading is disabled, use the configured value
+ final CoordinatorDynamicConfig dynamicConfig =
params.getCoordinatorDynamicConfig();
+ if (!dynamicConfig.isSmartSegmentLoading()) {
+ return maxSegmentsToMove;
+ }
+
+ // Move everything from decommissioning servers
+ int projectedDecommissioningSegments
+ = decommissioningServers.stream()
+ .mapToInt(server ->
server.getProjectedSegments().getTotalSegmentCount())
+ .sum();
Review Comment:
## Unread local variable
Variable 'int projectedDecommissioningSegments' is never read.
[Show more
details](https://github.com/apache/druid/security/code-scanning/5278)
--
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]