[fix](fe) Cascade revoke privileges when dropping resources#63632
Open
heguanhui wants to merge 1 commit into
Open
[fix](fe) Cascade revoke privileges when dropping resources#63632heguanhui wants to merge 1 commit into
heguanhui wants to merge 1 commit into
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
### What problem does this PR solve?
Issue Number: close #xxx
Problem Summary: When a resource (database, table, resource, workload group, or catalog) is dropped, the corresponding privilege entries in roles are not removed. This causes SHOW GRANTS to display orphan privileges referencing non-existent resources.
### Release note
Fixed an issue where dropping a database, table, resource, workload group, or catalog did not cascade-revoke the corresponding privileges from roles, causing SHOW GRANTS to display orphan privilege entries for non-existent resources.
### Check List (For Author)
- Test: Regression test
- Regression test / Unit Test / Manual test / No need to test (with reason)
- Behavior changed: No / Yes (SHOW GRANTS no longer shows orphan privileges for dropped resources)
- Does this need documentation: No
ab991c4 to
ad9b2b2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary: When a resource (database, table, resource, workload group, or catalog) is dropped, the corresponding privilege entries in roles are not cleaned up. This causes
SHOW GRANTSto display orphan privileges that reference non-existent resources. These orphan entries persist across FE restarts because the original GRANT records are replayed from BDB edit logs without any corresponding cleanup.Release note
Fix orphan privilege entries displayed by
SHOW GRANTSafter dropping databases, tables, resources, workload groups, or catalogs. Privileges referencing dropped resources are now cascade-revoked automatically.Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)