iilyak opened a new pull request #1655: Fix ets_lru configuration in chttpd 
application
URL: https://github.com/apache/couchdb/pull/1655
 
 
   ## Overview
   
   The code was incorrect in a sense that it was using is_integer guard,
   while `config:get` cannot return integer.
   
   ## Testing recommendations
   
   1. Update default.ini to set max_lifetime to 10000
   2. Restart chttpd application
   3. Try manually insert keys into lru_cache and query them. They all should 
be removed after 10 seconds
   ```
   lists:foreach(fun(Idx) -> ets_lru:insert(chttpd_auth_cache_lru, Idx, 
[1,2,3]) end, lists:seq(1, 1000)).
   lists:filter(fun(Idx) -> ets_lru:lookup(chttpd_auth_cache_lru, Idx) /= 
not_found end, lists:seq(1, 1000)).
   ```
   4. Try negative value for the setting check logs to make sure it complains
   5. Try putting "some_string" as value check logs to make sure it complains
   
   
   ## Related Issues or Pull Requests
   
   N/A
   
   ## Checklist
   
   - [x] Code is written and works correctly;
   - [ ] Changes are covered by tests;
   - [ ] Documentation reflects the changes;
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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