AmatyaAvadhanula commented on code in PR #15274:
URL: https://github.com/apache/druid/pull/15274#discussion_r1375663098
##########
server/src/main/java/org/apache/druid/server/http/DataSourcesResource.java:
##########
@@ -873,16 +872,14 @@ public Response isHandOffComplete(
final DateTime now = DateTimes.nowUtc();
// A segment that is not eligible for load will never be handed off
- boolean notEligibleForLoad = true;
+ boolean eligibleForLoad = false;
for (Rule rule : rules) {
if (rule.appliesTo(theInterval, now)) {
- if (rule instanceof LoadRule) {
- notEligibleForLoad = false;
- }
+ eligibleForLoad = rule.shouldSegmentBeLoaded();
break;
Review Comment:
I don't think we should break anymore if there are multiple rules that
apply.
Suppose the first rule is 0-replica rule, and the second is a 2-replica rule
for a different tier, this implementation might break saying that
`eligibleForLoad = false`, but it should have been true and waited for handoff
--
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]