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

[master < ]Cache user to speed up PullPlan #1109

Merged
merged 7 commits into from
Aug 1, 2023
Merged

[master < ]Cache user to speed up PullPlan #1109

merged 7 commits into from
Aug 1, 2023

Conversation

andrejtonev
Copy link
Contributor

[master < Task] PR

  • Check, and update documentation if necessary
  • Provide the full content or a guide for the final git message

To keep docs changelog up to date, one more thing to do:

  • Write a release note here, including added/changed clauses
  • Tag someone from docs team in the comments

A new FineGrainedAuthChecker is created each time a PullPlan is created. Here we called GetUser(username) which goes to disk and fetches the user data. Caching the user will help speed this up (since the user almost never changes).

@andrejtonev andrejtonev changed the title Cache user to speed up PullPlan [master < ]Cache user to speed up PullPlan Jul 26, 2023
@andrejtonev andrejtonev self-assigned this Jul 26, 2023
@andrejtonev andrejtonev added this to the mg-v2.10.0 milestone Jul 26, 2023
src/glue/auth_checker.cpp Outdated Show resolved Hide resolved
@gitbuda gitbuda merged commit 5bbed6e into master Aug 1, 2023
6 checks passed
@gitbuda gitbuda deleted the MG-auth-speedup branch August 1, 2023 21:04
@vpavicic
Copy link
Contributor

vpavicic commented Aug 2, 2023

@andrejtonev - release note please :)

@andrejtonev
Copy link
Contributor Author

@vpavicic

Performance improvement when running queries with authorization turned on (with a user).
FineGrainedPermission would read from disk on every query execution. Now we cache the user's info and avoid going to disk until a new user is detected.
NOTE: Changes to the user's privileges will be ignored until next login.

@vpavicic
Copy link
Contributor

vpavicic commented Aug 3, 2023

@andrejtonev ok?

Users with fine-grained privileges will experience better performance when running
queries due to user information cashing. Any changes to the user privileges will
be ignored until the next login.

@andrejtonev
Copy link
Contributor Author

@vpavicic
perfect

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

Successfully merging this pull request may close these issues.

4 participants