-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add expire-after-write to roles cache #30505
Comments
Pinging @elastic/es-security |
Regarding poorly timed node failures: We execute an acction to clear entries from the cache after they are updated in the native store The client that sent the failed update ought to retry since it never got a successful response, but we cannot guarantee that will happen (e.g. perhaps the client failed at the same time, due to the same power outage) |
I like the idea to expire after write, just for my understanding: When the index gets updated on the other nodes, do we get any event to a listener that allows us to monitor security index changes and then do invalidation of cache? Eventually, index on the other node will be updated, I do see IndexOutOfDateChange not sure if it is the same thing, would this handle the scenario? |
@bizybot At the moment, because we theoretically (*) replicate the security index to every node, each node knows when the index gets updated, but we don't have listeners for such events. And:
|
The current role store cache has no automatic expiry except if full (which will rarely happen).
However that means that any inconsistencies that somehow find their way into the cache (through bugs, poorly timed node failures, etc) will persist until either
it would be preferable to add a eviction time on this cache, even if it is measured in hours.
The text was updated successfully, but these errors were encountered: