Files
scylladb/utils
Paweł Dziepak 3b9c0a6ae2 Merge "loading_cache: fix the known complexity issue in the shrink() method" from Vlad
Use the boost::intrusive containers in order to achieve a O(1) complexity
for both "LRU list" update and to minimize the memory overhead in the hash
table item to "LRU list" item connection:
   - Make the timestamped_val be both a bi::list and a bi::unordered_set
     item.
   - Make a bi::unordered_set be a cache backend instead of the
     std::unordered_map.

As a result dropping k LRU items becomes an O(k) operation instead of
O(N log N), where N is a total number of all cached items:
   - Every time a value is read - move it to the front of the "LRU list"
     (O(1)).
   - When we need to remove k LRU items:
      - Repeat k times:
         - Take an element from the back of the "LRU list". (O(1)).
         - Remove it from the bi::unordered_set and dispose. (O(1)).
           We use an auto-unlink configuration for bi::list, therefore
           disposing an item is going to auto unlink it from the list.

* 'permissions_cache_move_to_intrusive-v1' of github.com:scylladb/seastar-dev:
  utils::loading_cache: cleanup
  utils/loading_cache.hh: use intrusive list to store the lru entry
  utils::loading_cache: implement automatic rehashing
  utils::loading_cache: make the underlying map to be an intrusive unordered_set
2017-05-23 16:18:16 +01:00
..
2016-06-20 21:29:51 +01:00
2016-12-05 11:48:29 +02:00
2017-04-17 23:03:15 +03:00
2017-05-17 12:30:03 +03:00
2015-12-08 19:31:40 +01:00
2017-02-01 14:39:08 +02:00
2016-09-28 17:34:16 +03:00
2017-05-22 23:02:18 -04:00
2016-04-08 08:12:47 +03:00
2017-03-02 09:05:10 +00:00
2016-04-08 08:12:47 +03:00
2016-04-08 08:12:47 +03:00