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

Deprecate PinotHelixResourceManager#getAllTables() in favour of getAllTables(String databaseName) #12782

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

shounakmk219
Copy link
Collaborator

Description

  • Deprecating PinotHelixResourceManager#getAllTables() in favour of PinotHelixResourceManager#getAllTables(String databaseName) as getAllTables() only works for default database.
  • Callers which actually need all the tables across all databases are updated to iterate over all databases and fetch all the tables

labels

release-notes

release-notes

Deprecating PinotHelixResourceManager#getAllTables() in favour of PinotHelixResourceManager#getAllTables(String databaseName)

_helixResourceManager.getDatabaseNames().stream()
.map(_helixResourceManager::getAllTables)
.flatMap(List::stream)
.forEach(tableNameWithType -> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

looped code is not changed at all.

@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 61.99%. Comparing base (59551e4) to head (03dfd5a).
Report is 199 commits behind head on master.

Files Patch % Lines
...apache/pinot/controller/BaseControllerStarter.java 63.41% 10 Missing and 5 partials ⚠️
.../helix/core/cleanup/StaleInstancesCleanupTask.java 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12782      +/-   ##
============================================
+ Coverage     61.75%   61.99%   +0.24%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2461      +25     
  Lines        133233   134737    +1504     
  Branches      20636    20818     +182     
============================================
+ Hits          82274    83533    +1259     
- Misses        44911    45055     +144     
- Partials       6048     6149     +101     
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 61.95% <66.66%> (+0.24%) ⬆️
java-21 61.87% <66.66%> (+0.25%) ⬆️
skip-bytebuffers-false 61.98% <66.66%> (+0.23%) ⬆️
skip-bytebuffers-true 61.85% <66.66%> (+34.12%) ⬆️
temurin 61.99% <66.66%> (+0.24%) ⬆️
unittests 61.99% <66.66%> (+0.24%) ⬆️
unittests1 46.72% <ø> (-0.17%) ⬇️
unittests2 27.98% <66.66%> (+0.25%) ⬆️

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.

if (existSchemaName == null || existSchemaName.equals(rawTableName)) {
// Although the table config is valid, we still need to ensure the schema exists
if (!schemaExists) {
LOGGER.warn("Failed to find schema for table: {}", tableNameWithType);
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: change all the log lines to reflect the database name as well along with table name

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, seems like all table names already contain the dbName so this can be ignored.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's correct.

Copy link
Contributor

@KKcorps KKcorps left a comment

Choose a reason for hiding this comment

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

One minor comment, overall LGTM

@KKcorps KKcorps merged commit eb8fbba into apache:master Apr 3, 2024
19 checks passed
@Jackie-Jiang
Copy link
Contributor

This is not efficient, and there are other places not handled correctly. Please take a look at #12804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants