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

Support initializing broker tags from config #12175

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

Jackie-Jiang
Copy link
Contributor

Address #11755

Support initializing broker tags from config and automatically updating broker resource when broker joins the cluster for the first time.

Configuration

pinot.broker.instance.tags (comma-separated): Broker tags to set when broker joins the cluster for the first time

@Jackie-Jiang Jackie-Jiang added feature documentation release-notes Referenced by PRs that need attention when compiling the next release notes Configuration Config changes (addition/deletion/change in behavior) labels Dec 19, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (f0b78b4) 61.64% compared to head (238bb19) 61.61%.

Files Patch % Lines
...e/pinot/broker/broker/helix/BaseBrokerStarter.java 41.66% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12175      +/-   ##
============================================
- Coverage     61.64%   61.61%   -0.03%     
  Complexity     1153     1153              
============================================
  Files          2407     2407              
  Lines        130915   130920       +5     
  Branches      20225    20227       +2     
============================================
- Hits          80697    80670      -27     
- Misses        44320    44362      +42     
+ Partials       5898     5888      -10     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (ø)
integration <0.01% <0.00%> (ø)
integration1 <0.01% <0.00%> (ø)
integration2 0.00% <0.00%> (ø)
java-11 61.57% <41.66%> (-0.01%) ⬇️
java-21 61.49% <41.66%> (-0.03%) ⬇️
skip-bytebuffers-false 61.59% <41.66%> (-0.01%) ⬇️
skip-bytebuffers-true 61.47% <41.66%> (-0.02%) ⬇️
temurin 61.61% <41.66%> (-0.03%) ⬇️
unittests 61.61% <41.66%> (-0.03%) ⬇️
unittests1 46.66% <ø> (+<0.01%) ⬆️
unittests2 27.69% <41.66%> (-0.03%) ⬇️

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.

for (String instanceTag : StringUtils.split(instanceTagsConfig, ',')) {
Preconditions.checkArgument(TagNameUtils.isBrokerTag(instanceTag), "Illegal broker instance tag: %s",
instanceTag);
instanceConfig.addTag(instanceTag);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering this comes from a config file, shall we do instanceTag.trim()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I did add trim(), but then decided to remove it to keep it consistent with PinotHelixResourceManager.updateInstanceTags().
If we find people making mistakes frequently, we can consider changing both to use trim(). Currently we don't have a check that tag cannot start/end with space, so this might cause backward-incompatible

@Jackie-Jiang Jackie-Jiang merged commit f36cc10 into apache:master Dec 19, 2023
19 checks passed
@Jackie-Jiang Jackie-Jiang deleted the broker_tags_from_config branch December 19, 2023 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Configuration Config changes (addition/deletion/change in behavior) documentation feature release-notes Referenced by PRs that need attention when compiling the next release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants