-
Notifications
You must be signed in to change notification settings - Fork 409
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
[#6238] improvement(storage): Improve get role performance when roles is bound to many metadata. #6455
Conversation
In xiaomi company, we find when roles is bounded to many securable objects, then get role is very slow, so we try so solve get role function. |
c811185
to
1860a7a
Compare
core/src/main/java/org/apache/gravitino/storage/relational/service/RoleMetaService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/gravitino/storage/relational/service/RoleMetaService.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/apache/gravitino/storage/relational/service/TestRoleMetaService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/gravitino/storage/relational/service/RoleMetaService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/gravitino/storage/relational/service/RoleMetaService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/gravitino/storage/relational/service/RoleMetaService.java
Show resolved
Hide resolved
core/src/main/java/org/apache/gravitino/storage/relational/service/RoleMetaService.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/gravitino/storage/relational/service/RoleMetaService.java
Show resolved
Hide resolved
1860a7a
to
0dc985e
Compare
.../org/apache/gravitino/storage/relational/mapper/provider/base/SchemaMetaBaseSQLProvider.java
Outdated
Show resolved
Hide resolved
0dc985e
to
a638ad3
Compare
core/src/main/java/org/apache/gravitino/storage/relational/service/RoleMetaService.java
Outdated
Show resolved
Hide resolved
a638ad3
to
5f39afe
Compare
5f39afe
to
7c6803d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@yuqi1129 Do U have any other suggestion? |
No, it looks good to me. |
Merged. @yuqi1129 Thanks for your review. @FourFriends. thanks for your first contribution. It's a great start. Welcome to join the Gravitino community and enjoy your trip of open source. |
… roles is bound to many metadata. (apache#6455) ### What changes were proposed in this pull request? fix issue apache#6238 improve performance when a single role is bound to many metadata. ### Why are the changes needed? Use batch queries when getting role securable object full names instead of loop queries to get each securable object full name. Fix: apache#6238 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Unit tests and integration tests have all passed, this feature has been running internally at Xiaomi for two weeks. Co-authored-by: luoxin5 <[email protected]>
… roles is bound to many metadata. (apache#6455) ### What changes were proposed in this pull request? fix issue apache#6238 improve performance when a single role is bound to many metadata. ### Why are the changes needed? Use batch queries when getting role securable object full names instead of loop queries to get each securable object full name. Fix: apache#6238 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Unit tests and integration tests have all passed, this feature has been running internally at Xiaomi for two weeks. Co-authored-by: luoxin5 <[email protected]>
… roles is bound to many metadata. (apache#6455) ### What changes were proposed in this pull request? fix issue apache#6238 improve performance when a single role is bound to many metadata. ### Why are the changes needed? Use batch queries when getting role securable object full names instead of loop queries to get each securable object full name. Fix: apache#6238 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Unit tests and integration tests have all passed, this feature has been running internally at Xiaomi for two weeks. Co-authored-by: luoxin5 <[email protected]>
What changes were proposed in this pull request?
fix issue #6238
improve performance when a single role is bound to many metadata.
Why are the changes needed?
Use batch queries when getting role securable object full names instead of loop queries to get each securable object full name.
Fix: #6238
Does this PR introduce any user-facing change?
No
How was this patch tested?
Unit tests and integration tests have all passed, this feature has been running internally at Xiaomi for two weeks.