-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling of empty server tags in controller's availability check #13954
Handling of empty server tags in controller's availability check #13954
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #13954 +/- ##
============================================
- Coverage 61.75% 57.89% -3.86%
- Complexity 207 219 +12
============================================
Files 2436 2612 +176
Lines 133233 143206 +9973
Branches 20636 21988 +1352
============================================
+ Hits 82274 82905 +631
- Misses 44911 53818 +8907
- Partials 6048 6483 +435
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pinot-common/src/main/java/org/apache/pinot/common/utils/helix/HelixHelper.java
Outdated
Show resolved
Hide resolved
...test/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManagerStatelessTest.java
Outdated
Show resolved
Hide resolved
...ntroller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
Outdated
Show resolved
Hide resolved
Looked at the failed test cases - seems like flanky ones , doesn't look related to the changes too - In local same tests are working fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor comments
@@ -552,6 +565,17 @@ public static List<InstanceConfig> getInstancesConfigsWithTag(List<InstanceConfi | |||
return instancesWithTag; | |||
} | |||
|
|||
public static List<InstanceConfig> getInstancesConfigsWithoutTag(List<InstanceConfig> instanceConfigs, String tag) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest changing tag
to defaultTag
and add some javadoc explaining this is the tag representing that there is no tag associated with the instance. Same for other methods
List<InstanceConfig> instancesWithoutTag = getInstancesConfigsWithoutTag(instanceConfigs, tag); | ||
return instancesWithoutTag.stream().map(InstanceConfig::getInstanceName).collect(Collectors.toList()); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) Remove extra empty line
PR addresses an issue where the Pinot controller incorrectly interprets servers with empty tag lists as "tagged" servers. The current logic in PinotHelixResourceManager checks for the presence of the "server_untagged" tag to determine if a server is untagged and thus available. However, when a server has no tags, it is mistakenly considered as tagged, leading to incorrect behavior in server availability checks.
https://apache-pinot.slack.com/archives/C011C9JHN7R/p1725801169774139