Skip to content
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

Merged
merged 8 commits into from
Sep 10, 2024

Conversation

anandheritage
Copy link
Contributor

@anandheritage anandheritage commented Sep 8, 2024

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

image

@anandheritage anandheritage changed the title Fix for untag in server Fix handling of empty server tags in controller's availability check Sep 8, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 57.89%. Comparing base (59551e4) to head (5d81a84).
Report is 1013 commits behind head on master.

Files with missing lines Patch % Lines
...g/apache/pinot/common/utils/helix/HelixHelper.java 0.00% 9 Missing ⚠️
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     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 57.86% <25.00%> (-3.85%) ⬇️
java-21 57.76% <25.00%> (-3.87%) ⬇️
skip-bytebuffers-false 57.88% <25.00%> (-3.87%) ⬇️
skip-bytebuffers-true 57.73% <25.00%> (+30.01%) ⬆️
temurin 57.89% <25.00%> (-3.86%) ⬇️
unittests 57.88% <25.00%> (-3.86%) ⬇️
unittests1 40.76% <0.00%> (-6.13%) ⬇️
unittests2 27.93% <25.00%> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anandheritage anandheritage changed the title Fix handling of empty server tags in controller's availability check Handling of empty server tags in controller's availability check Sep 10, 2024
@anandheritage
Copy link
Contributor Author

Screenshot 2024-09-10 at 8 53 34 PM
Screenshot 2024-09-10 at 8 54 37 PM
Screenshot 2024-09-10 at 8 56 16 PM
Screenshot 2024-09-10 at 8 57 32 PM

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.
Let me know if @mayankshriv @Jackie-Jiang if you folks think otherwise.

Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a 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) {
Copy link
Contributor

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());
}

Copy link
Contributor

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

@mayankshriv mayankshriv merged commit 601c5b7 into apache:master Sep 10, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants