While working on KNOX-2402 there were some performance issues related to AliasBasedTokenStateService which the new tool revealed during the test phase:
AliasBasedTokenStateService:
- updateExpiration() goes directly to alias service rather than updating it locally and let the background thread does its job
- getTokens goes directly to alias service
DefaultTokenStateService:
- we should start using ConcurrentHashMap instead of HashMap for tokenExpirations and maxTokenLifetimes -> many of the synchronization blocks could be get rid of (CHM gives better performance anyway)
- review getTokens() usage
- eviction: needs to consider the case when Gateway was restarted -> nothing found in memory -> eviction is extremely slow
- links to