pzampino opened a new pull request #337: URL: https://github.com/apache/knox/pull/337
… frequently ## What changes were proposed in this pull request? The goal of these changes is to reduce the number of times during a token state reaper iteration that the keystore file is loaded and subsequently written. This change reduces that number from (1 + 2-to-4-per-token) to (1 + 0-to-1-per-token + 1). So, for 100 expired tokens and 100 unexpired tokens, that means going from 601 loads to 2 loads (if all the token state aliases are cached) or up to 202 in the absolute worst case when none of the token state aliases is cached. Part of the solution includes adding bulk alias/key removal method to the AliasService and KeystoreService respectively. ## How was this patch tested? I've added multiple tests to exercise these changes: AliasBasedTokenStateServiceTest, DefaultTokenStateServiceTest, DefaultKeystoreServiceTest, RemoteAliasServiceTest, and ZookeeperRemoteAliasServiceTest. I'm continuing manual testing, but wanted to get the review process started as soon as possible. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
