redict/src
antirez e423f76e75 LRU: Make cross-database choices for eviction.
The LRU eviction code used to make local choices: for each DB visited it
selected the best key to evict. This was repeated for each DB. However
this means that there could be DBs with very frequently accessed keys
that are targeted by the LRU algorithm while there were other DBs with
many better candidates to expire.

This commit attempts to fix this problem for the LRU policy. However the
TTL policy is still not fixed by this commit. The TTL policy will be
fixed in a successive commit.

This is an initial (partial because of TTL policy) fix for issue #2647.
2016-07-13 13:12:30 +02:00
..
modules Modules: mention RedisModule_Calloc() in the doc. 2016-06-23 16:20:48 +02:00
.gitignore Ignore gcov/lcov artifacts 2012-04-13 17:52:33 -07:00
adlist.c various cleanups and minor fixes 2016-04-25 16:49:57 +03:00
adlist.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
ae_epoll.c various cleanups and minor fixes 2016-04-25 16:49:57 +03:00
ae_evport.c ae.c event loop: API to resize the fd set size on the run. 2013-06-28 16:39:49 +02:00
ae_kqueue.c No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
ae_select.c Include 'fd_set' type name 2016-06-07 16:46:00 -04:00
ae.c ae.c: Fix delay until next timer event. 2016-04-04 14:13:46 +02:00
ae.h Fix ae.c to avoid timers infinite loop. 2016-04-04 08:50:58 +02:00
anet.c anet.c: new API anetTcpNonBlockBestEffortBindConnect() 2015-06-11 14:34:38 +02:00
anet.h Fix ae.c to avoid timers infinite loop. 2016-04-04 08:50:58 +02:00
aof.c Modules: support for modules native data types. 2016-06-03 18:14:04 +02:00
asciilogo.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
atomicvar.h Atomic vars implemented in a more general way. 2015-10-01 13:02:25 +02:00
bio.c Lazyfree: ability to free whole DBs in background. 2015-10-01 13:02:26 +02:00
bio.h Threaded lazyfree WIP #1. 2015-10-01 13:02:25 +02:00
bitops.c Minor aesthetic fixes to PR #3264. 2016-06-16 12:54:33 +02:00
blocked.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
cluster.c RESTORE: accept RDB dumps with older versions. 2016-06-16 15:53:57 +02:00
cluster.h Cluster announce ip / port initial implementation. 2016-01-29 09:06:37 +01:00
config.c CONFIG GET is now no longer case sensitive. 2016-07-04 16:09:24 +02:00
config.h HAVE_SYNC_FILE_RANGE should be protected by ifdef __linux__. 2015-02-10 09:29:14 +01:00
crc16.c RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
crc64.c Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
crc64.h Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
db.c Expire and LRU related code moved into different files. 2016-07-06 15:24:06 +02:00
debug.c Use const in Redis Module API where possible. 2016-06-20 23:08:06 +03:00
dict.c dict.c minor optimization 2016-04-25 16:48:25 +03:00
dict.h Lazyfree: a first implementation of non blocking DEL. 2015-10-01 13:00:19 +02:00
endianconv.c Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
endianconv.h Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
evict.c LRU: Make cross-database choices for eviction. 2016-07-13 13:12:30 +02:00
expire.c Add expire.c and evict.c. 2016-07-06 15:28:18 +02:00
fmacros.h Silence _BSD_SOURCE warnings in glibc 2.20 and forward 2014-12-05 12:41:59 +11:00
geo.c fix georadius returns multiple replies 2016-05-23 13:58:50 +03:00
geo.h RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
geohash_helper.c Remove dead code from geohash_helper.c. 2016-07-06 16:39:23 +02:00
geohash_helper.h Fix definition of M_PI in geohash_helper.c. 2016-07-06 16:31:11 +02:00
geohash.c geohash.c and geohash_helper.c are part of Redis. 2016-07-06 16:02:38 +02:00
geohash.h geohash.c and geohash_helper.c are part of Redis. 2016-07-06 16:02:38 +02:00
help.h redis-cli help.h updated. 2016-06-14 14:45:28 +02:00
hyperloglog.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
intset.c Use const in Redis Module API where possible. 2016-06-20 23:08:06 +03:00
intset.h Use const in Redis Module API where possible. 2016-06-20 23:08:06 +03:00
latency.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
latency.h Separate latency monitoring of eviction loop and eviction DELs. 2015-02-11 10:52:27 +01:00
lazyfree.c fix linux compile bug 2016-01-13 00:49:28 -08:00
lzf_c.c Upgrade LZF to 3.6 (2011) from 3.5 (2009) 2015-01-02 11:16:10 -05:00
lzf_d.c Upgrade LZF to 3.6 (2011) from 3.5 (2009) 2015-01-02 11:16:10 -05:00
lzf.h No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
lzfP.h Upgrade LZF to 3.6 (2011) from 3.5 (2009) 2015-01-02 11:16:10 -05:00
Makefile geohash.c and geohash_helper.c are part of Redis. 2016-07-06 16:02:38 +02:00
memtest.c Hopefully better memory test on crash. 2015-12-16 17:41:22 +01:00
mkreleasehdr.sh suppress external diff program when using git diff. 2013-02-24 18:17:46 +01:00
module.c Merge pull request #3335 from dvirsky/rm_calloc 2016-06-23 16:19:14 +02:00
multi.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
networking.c CLIENT error message was out of date 2016-05-23 11:42:21 +03:00
notify.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
object.c Expire and LRU related code moved into different files. 2016-07-06 15:24:06 +02:00
pqsort.c No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
pqsort.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
pubsub.c RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
quicklist.c Fix quicklistReplaceAtIndex() by updating the quicklist ziplist size. 2016-06-27 18:02:33 +02:00
quicklist.h Use const in Redis Module API where possible. 2016-06-20 23:08:06 +03:00
rand.c Use 'void' for zero-argument functions 2014-08-08 10:05:32 +02:00
rand.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
rdb.c In Redis RDB check: more details in error reportings. 2016-07-01 15:26:55 +02:00
rdb.h Modules: support for modules native data types. 2016-06-03 18:14:04 +02:00
redis-benchmark.c redis-benchmark: new option to show server errors on stdout. 2016-07-12 11:23:31 +02:00
redis-check-aof.c BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
redis-check-rdb.c redis_check_rdb(): the rio structure must be global. 2016-07-06 19:12:24 +02:00
redis-cli.c redis-cli: check SELECT reply type just in state updated. 2016-07-05 15:18:40 +02:00
redis-trib.rb Merge pull request #3152 from be-hase/fix/check_open_slots 2016-05-05 08:56:28 +02:00
redisassert.h RDMF: redisAssert -> serverAssert. 2015-07-26 15:29:53 +02:00
redismodule.h Fix RedisModule_Calloc() definition typo. 2016-06-23 22:30:32 +03:00
release.c No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
replication.c Centralize slave replication handshake aborting. 2015-12-03 10:38:56 +01:00
rio.c various cleanups and minor fixes 2016-04-25 16:49:57 +03:00
rio.h Modules: support for modules native data types. 2016-06-03 18:14:04 +02:00
scripting.c Merge pull request #732 from evilpacket/remove_dofile 2016-05-08 18:04:41 +02:00
sds.c minor fixes - mainly signalModifiedKey, and GEORADIUS 2016-05-09 12:05:33 +03:00
sds.h Lua debugger: use sds_malloc() to allocate eval cli array. 2015-11-17 15:43:23 +01:00
sdsalloc.h SDS: changes to unify Redis SDS with antirez/sds repo. 2015-07-25 17:25:44 +02:00
sentinel.c Sentinel: fix cross-master Sentinel address update. 2016-07-04 18:45:24 +02:00
server.c LRU: Make cross-database choices for eviction. 2016-07-13 13:12:30 +02:00
server.h LRU: Make cross-database choices for eviction. 2016-07-13 13:12:30 +02:00
setproctitle.c Set proctitle: avoid the use of __attribute__((constructor)). 2013-02-27 11:50:35 +01:00
sha1.c sha1.c: use standard uint32_t. 2015-04-27 12:07:49 +02:00
sha1.h sha1.c: use standard uint32_t. 2015-04-27 12:07:49 +02:00
slowlog.c RDMF: REDIS_OK REDIS_ERR -> C_OK C_ERR. 2015-07-26 23:17:55 +02:00
slowlog.h RDMF: use client instead of redisClient, like Disque. 2015-07-26 15:20:52 +02:00
solarisfixes.h Check for __sun macro in solarisfixes.h, not in includers. 2015-01-09 11:23:22 +01:00
sort.c Lazyfree: Hash converted to use plain SDS WIP 4. 2015-10-01 13:02:25 +02:00
sparkline.c RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
sparkline.h LATENCY GRAPH implemented. 2014-07-02 16:31:22 +02:00
syncio.c syncWithMaster(): non blocking state machine. 2015-08-06 18:12:20 +02:00
t_hash.c Use const in Redis Module API where possible. 2016-06-20 23:08:06 +03:00
t_list.c Use const in Redis Module API where possible. 2016-06-20 23:08:06 +03:00
t_set.c Use const in Redis Module API where possible. 2016-06-20 23:08:06 +03:00
t_string.c GETRANGE: return empty string with negative, inverted start/end. 2016-06-15 12:48:58 +02:00
t_zset.c Use const in Redis Module API where possible. 2016-06-20 23:08:06 +03:00
testhelp.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
util.c Modules: first preview 31 March 2016. 2016-05-10 06:40:05 +02:00
util.h Fix HINCRBYFLOAT to work with long doubles. 2015-11-04 17:16:34 +01:00
valgrind.sup more valgrind friendly test 2011-07-06 15:22:00 +02:00
version.h Mark version of unstable branch in an unique way. 2015-09-29 17:30:24 +02:00
ziplist.c Free ziplist test lists during tests 2015-01-02 11:16:08 -05:00
ziplist.h Add header guard for ziplist.h 2015-04-29 10:33:21 +02:00
zipmap.c Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
zipmap.h Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
zmalloc.c fix linux compile bug 2016-01-13 00:49:28 -08:00
zmalloc.h getMemorySize() moved into zmalloc.c with other low level mem utils. 2014-12-17 17:11:20 +01:00