smolnar82 opened a new pull request #218: KNOX-2134 - Checking if password is 
available via local alias service before going to fetch it from remote ZK server
URL: https://github.com/apache/knox/pull/218
 
 
   ## What changes were proposed in this pull request?
   
   Formatted the code and did a minor cleanup to make it easier to read and 
understand the code.
   Apart from code cleanup, I changed the way how passwords are fetched in 
`ZookeeperRemoteAliasService`: before going to the remote ZK server we first 
check if the desired password is available through the local alias service. If 
so; we skip the remote check. This came with a separate commit to make it 
easier for review (see 
[here](https://github.com/apache/knox/commit/66933502ccfd2b64d244c636c6c28fbb22cc8b8e)).
   
   ## How was this patch tested?
   
   Added a JUnit test to measure performance (ignoring it from automatic 
execution, but can be executed manually by commenting out the `Ignore` 
annotation): added and fetched 200 aliases/passwords with and without my 
changes in place with the following results
   
   |Without cache (ms) |  With Cache (ms) |
   |--|--|
   | 
30841<br>31335<br>32762<br>31646<br>31736<br>31641<br>31204<br>34219<br>33720<br>33297
 |  
16715<br>16265<br>17469<br>17312<br>17482<br>20990<br>17343<br>19637<br>19240<br>17705
 |
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to