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

Adding a cluster config to enable instance pool and replica group configuration in table config #13131

Merged
merged 5 commits into from
Jun 10, 2024

Conversation

soumitra-st
Copy link
Contributor

@soumitra-st soumitra-st commented May 10, 2024

Added an insteance level configuration enforce.pool.based.assignment to enable instance pool and replica group configuration check in table config.

If a Pinot cluster is configured with server pools to restart the cluster faster, then enabling enforce.pool.based.assignment config will enforce all tables are using Pool-Based Instance Assignment and Replica-Group Segment Assignment .

feature

@codecov-commenter
Copy link

codecov-commenter commented May 10, 2024

Codecov Report

Attention: Patch coverage is 77.41935% with 7 lines in your changes missing coverage. Please review.

Project coverage is 62.12%. Comparing base (59551e4) to head (58ef324).
Report is 593 commits behind head on master.

Files Patch % Lines
...he/pinot/segment/local/utils/TableConfigUtils.java 69.56% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13131      +/-   ##
============================================
+ Coverage     61.75%   62.12%   +0.37%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2547     +111     
  Lines        133233   139947    +6714     
  Branches      20636    21722    +1086     
============================================
+ Hits          82274    86940    +4666     
- Misses        44911    46421    +1510     
- Partials       6048     6586     +538     
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 62.08% <77.41%> (+0.37%) ⬆️
java-21 61.99% <77.41%> (+0.36%) ⬆️
skip-bytebuffers-false 62.10% <77.41%> (+0.35%) ⬆️
skip-bytebuffers-true 61.96% <77.41%> (+34.23%) ⬆️
temurin 62.12% <77.41%> (+0.37%) ⬆️
unittests 62.11% <77.41%> (+0.37%) ⬆️
unittests1 46.70% <0.00%> (-0.19%) ⬇️
unittests2 27.71% <77.41%> (-0.02%) ⬇️

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.

@soumitra-st soumitra-st force-pushed the pool-replica-group-validation branch from 4b10d0a to 56b6769 Compare May 13, 2024 20:04
@Jackie-Jiang Jackie-Jiang added feature Configuration Config changes (addition/deletion/change in behavior) labels May 13, 2024
*/
public static void validate(TableConfig tableConfig, @Nullable Schema schema) {
validate(tableConfig, schema, null, false);
validate(tableConfig, schema, null, false, false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not keep adding booleans for each check type because it is hard to maintain. Suggest making them static, and set them up when starting the controller. validate() only takes tableConfig, schema and optional typesToSkip

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TableConfigUtils has static utility methods only. IMO, we should not store state as static variables in that class.

Copy link
Contributor

Choose a reason for hiding this comment

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

These are always instance level/cluster level config, so it should be good to have them as static (basically model it as a singleton validator). We may add 2 static methods setDisableGroovy() and setEnforcePoolBasedAssignment(), and set them up in the ControllerStarter.

@soumitra-st soumitra-st force-pushed the pool-replica-group-validation branch from 5318366 to 2c0d755 Compare June 4, 2024 12:50
@soumitra-st soumitra-st force-pushed the pool-replica-group-validation branch from 2c0d755 to 58ef324 Compare June 10, 2024 19:29
@Jackie-Jiang
Copy link
Contributor

Good job! Please also update the pinot doc about the new config

@Jackie-Jiang Jackie-Jiang merged commit 425182f into apache:master Jun 10, 2024
20 checks passed
@soumitra-st soumitra-st deleted the pool-replica-group-validation branch June 10, 2024 22:53
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants