mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 05:28:34 +00:00
Previously the roles store cache was unbounded as it was a just using a ConcurrentHashMap, which could lead to excessive memory usage in cases where there are a large number of roles as we tried to eagerly load the roles into the cache if they were not present. The roles store now loads roles on demand and caches them for a finite period of time. Additionally, the background polling of roles has been removed to reduce complexity. A best effort attempt is made to clear the roles cache upon modification and if necessary the cache can be cleared manually. See elastic/elasticsearch#1837 Original commit: elastic/x-pack-elasticsearch@450dd779c8