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

refactor(query): first check privilege in SystemEngine get_full_data #16421

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

TCeason
Copy link
Collaborator

@TCeason TCeason commented Sep 9, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Optimize:

in system table engine , we can only get database that current user can be visibility.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 9, 2024
@TCeason TCeason marked this pull request as draft September 9, 2024 08:06
@dosubot dosubot bot added A-query Area: databend query C-performance Category: Performance labels Sep 9, 2024
drmingdrmer added a commit to drmingdrmer/databend that referenced this pull request Sep 9, 2024
`mget_id_value_compat([names])` fetch a list of `name->id->value` from
meta-service with exact 2 mget() operations.

This method can be used to optimize batch get operations. For example to
get a list of `(DatabaseNameIdent, DatabaseId, DatabaseMeta)`.

This method requires the id type to be a `Id<xxxId>` type.

- Part of databendlabs#16421
drmingdrmer added a commit to drmingdrmer/databend that referenced this pull request Sep 9, 2024
`mget_id_value_compat([names])` fetch a list of `name->id->value` from
meta-service with exact 2 mget() operations.

This method can be used to optimize batch get operations. For example to
get a list of `(DatabaseNameIdent, DatabaseId, DatabaseMeta)`.

This method requires the id type to be a `Id<xxxId>` type.

- Part of databendlabs#16421
@TCeason TCeason changed the title optimize(query): first check privilege in SystemEngine get_full_data refactor(query): first check privilege in SystemEngine get_full_data Sep 9, 2024
@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Sep 9, 2024
@TCeason TCeason removed the C-performance Category: Performance label Sep 9, 2024
drmingdrmer added a commit that referenced this pull request Sep 9, 2024
`mget_id_value_compat([names])` fetch a list of `name->id->value` from
meta-service with exact 2 mget() operations.

This method can be used to optimize batch get operations. For example to
get a list of `(DatabaseNameIdent, DatabaseId, DatabaseMeta)`.

This method requires the id type to be a `Id<xxxId>` type.

- Part of #16421
@TCeason TCeason force-pushed the optimize_system branch 4 times, most recently from ee2fc51 to 523e73b Compare September 10, 2024 03:36
Copy link
Member

@drmingdrmer drmingdrmer left a comment

Choose a reason for hiding this comment

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

Reviewed 10 of 17 files at r2, 3 of 5 files at r3, all commit messages.
Reviewable status: 12 of 19 files reviewed, all discussions resolved

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 10, 2024
@TCeason TCeason marked this pull request as ready for review September 10, 2024 05:36
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Sep 10, 2024
@TCeason
Copy link
Collaborator Author

TCeason commented Sep 10, 2024

Cc @wubx You can test show columns with this optimize.

Copy link
Member

@flaneur2020 flaneur2020 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@BohuTANG BohuTANG merged commit 16c7d99 into databendlabs:main Sep 10, 2024
88 of 89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query Area: databend query lgtm This PR has been approved by a maintainer pr-refactor this PR changes the code base without new features or bugfix size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants