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

[Refactoring]: improve authenticateCanExecuteStatementAndPlan for execute prepare stmt #21284

Open
ouyuanning opened this issue Jan 20, 2025 · 1 comment
Assignees
Labels
Milestone

Comments

@ouyuanning
Copy link
Contributor

ouyuanning commented Jan 20, 2025

Why do you want to refactor this code?

目前prepare后的语句,在执行前做执行权限验证的时候会使用常规的方式验证(提取权限需求,到cache找,找不到则...)

Describe the solution you'd like

具体优化方式待跟彭振讨论。大概的方向
1、最理想,只要检查session的权限是否有更新,没有更新则认为有权限。
(不过这种方式跟当前的权限处理逻辑对不上。因为当前逻辑是如果没权限那么会更新一次权限cache,并不是每次权限更新通知所有session)

2、其次可以cache住权限清单。省掉 determinePrivilegeSetOfStatement、extractPrivilegeTipsFromPlan、convertPrivilegeTipsToPrivilege这3步的消耗

Describe alternatives you've considered

No response

Additional information

No response

@ouyuanning ouyuanning added this to the 2.1.0 milestone Jan 20, 2025
@ouyuanning ouyuanning self-assigned this Jan 20, 2025
@ouyuanning
Copy link
Contributor Author

如果方案1,可能需要彭振帮忙处理一下
如果方案2,可以让波洋先处理,在prepare的时候把这些数据线提取出来。在execute的时候直接用就可以了

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

No branches or pull requests

1 participant