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

RANGER-5148: Fix redundant role cache modifications triggered by role ... #534

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gooch0922
Copy link

… version changes in scenarios with many plugin clients

What changes were proposed in this pull request?

The purpose of this change is to address the issue of redundant role cache modifications in concurrent scenarios, as described in [ranger - 5148]. After acquiring the lock, a check is performed to determine whether the role version number in the cache is already greater than or equal to the version number retrieved from the database. If this condition evaluates to true, the cached data can be directly returned.

How was this patch tested?

I manually tested this patch. Through means like debugging and with the help of tools such as JMeter, I simulated concurrent request scenarios. In these scenarios, threads competing for the lock will either directly access the cache or print the contents of the patch in the debug logs.

… version changes in scenarios with many plugin clients
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant