redis/src
antirez 49147f36e9 Don't expire keys while loading RDB from AOF preamble.
The AOF tail of a combined RDB+AOF is based on the premise of applying
the AOF commands to the exact state that there was in the server while
the RDB was persisted. By expiring keys while loading the RDB file, we
change the state, so applying the AOF tail later may change the state.

Test case:

* Time1: SET a 10
* Time2: EXPIREAT a $time5
* Time3: INCR a
* Time4: PERSIT A. Start bgrewiteaof with RDB preamble. The value of a is 11 without expire time.
* Time5: Restart redis from the RDB+AOF: consistency violation.

Thanks to @soloestoy for providing the patch.
Thanks to @trevor211 for the original issue report and the initial fix.

Check issue #4950 for more info.
2018-05-29 12:37:42 +02:00
..
modules Modules API: blocked client disconnection callback. 2018-04-12 13:21:48 +02:00
.gitignore
Makefile append -lrt to FINAL_LIBS for linux 2018-05-25 20:16:57 +08:00
adlist.c adlist: fix listJoin() in the case the second list is empty. 2017-11-28 18:25:14 +01:00
adlist.h Modules TSC: Handling of RM_Reply* functions. 2017-05-02 15:05:39 +02:00
ae.c Fix ae.c when a timer finalizerProc adds an event. 2018-03-28 14:11:04 +02:00
ae.h Fix ae.c when a timer finalizerProc adds an event. 2018-03-28 14:11:04 +02: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
anet.c fix missed call on freeaddrinfo 2018-03-21 15:34:13 +08:00
anet.h Fix ae.c to avoid timers infinite loop. 2016-04-04 08:50:58 +02:00
aof.c Don't expire keys while loading RDB from AOF preamble. 2018-05-29 12:37:42 +02:00
asciilogo.h
atomicvar.h atomicvar.h: show used API in INFO. Add macro to force __sync builtin. 2017-05-10 09:33:49 +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 Use ARM unaligned accesses ifdefs for SPARC as well. 2017-02-23 22:39:44 +08:00
blocked.c ZPOP: fix replication of blocking ZPOP. 2018-05-15 16:03:56 +02:00
childinfo.c Clear child data when opening the pipes. 2016-09-19 14:11:17 +02:00
cluster.c Modules Cluster API: make node IDs pointers constant. 2018-03-30 13:16:07 +02:00
cluster.h Modules Cluster API: message bus implementation. 2018-03-29 15:13:31 +02:00
config.c Make active defragmentation tests optional. 2018-05-24 18:04:21 +02:00
config.h Use ARM unaligned accesses ifdefs for SPARC as well. 2017-02-23 22:39:44 +08: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 Implements [B]Z[REV]POP and the respective unit tests 2018-04-30 02:10:42 +03:00
debug.c Merge pull request #4099 from JunHe77/aarch64_stack_cflag 2018-05-24 16:16:12 +02:00
debugmacro.h Use the standard predefined identifier __func__ (since C99) 2016-08-04 15:12:12 +08:00
defrag.c Adding real allocator fragmentation to INFO and MEMORY command + active defrag test 2018-03-12 15:08:52 +02:00
dict.c dict: fix the int problem for defrag 2017-12-05 15:38:03 +01:00
dict.h dict: fix the int problem for defrag 2017-12-05 15:38:03 +01: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 Merge pull request #4594 from smallstool/bugfix-freeMemoryIfneeded-int-overflow 2018-05-08 17:27:18 +02:00
expire.c Track number of logically expired keys still in memory. 2018-02-19 11:12:49 +01:00
fmacros.h Silence _BSD_SOURCE warnings in glibc 2.20 and forward 2014-12-05 12:41:59 +11:00
geo.c Added GEORADIUS(BYMEMBER)_RO variants for read-only operations. 2017-06-30 10:03:37 +02:00
geo.h RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
geohash.c Multiple GEORADIUS bugs fixed. 2016-07-27 11:34:25 +02:00
geohash.h Multiple GEORADIUS bugs fixed. 2016-07-27 11:34:25 +02:00
geohash_helper.c Fix GEORADIUS edge case with huge radius. 2017-07-03 19:38:31 +02:00
geohash_helper.h Fix definition of M_PI in geohash_helper.c. 2016-07-06 16:31:11 +02:00
help.h redis-cli help.h updated. 2016-06-14 14:45:28 +02:00
hyperloglog.c Aesthetic changes to PR #4749. 2018-03-16 16:57:53 +01:00
intset.c Merge pull request #3242 from whatacold/unstable 2016-12-20 15:39:56 +01:00
intset.h Use const in Redis Module API where possible. 2016-06-20 23:08:06 +03:00
latency.c getting rid of duplicated code 2018-02-14 00:12:13 +09:00
latency.h Separate latency monitoring of eviction loop and eviction DELs. 2015-02-11 10:52:27 +01:00
lazyfree.c Put more details in the comment introduced by #4601. 2018-01-15 12:50:08 +01:00
listpack.c Remove warning from lpGet snprintf(). 2018-03-01 15:26:27 +01:00
listpack.h Streams: 12 commits squashed into the initial Streams implementation. 2017-12-01 10:24:24 +01:00
listpack_malloc.h Streams: change listpack allocator to zmalloc. 2017-12-01 10:24:24 +01:00
lzf.h No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
lzfP.h Fix undefined behavior constant defined. 2017-11-19 16:23:42 +00: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
memtest.c Hopefully better memory test on crash. 2015-12-16 17:41:22 +01:00
mkreleasehdr.sh
module.c Modules Timer API: fix wrong raxInsert() usage 2018-04-14 01:20:02 +08:00
multi.c Fix replication of SLAVEOF inside transaction. 2017-07-12 11:07:28 +02:00
networking.c Add top comments in two addReply*() functions. 2018-03-22 11:45:04 +01:00
notify.c Merge pull request #4479 from dvirsky/notify 2018-02-15 21:36:32 +01:00
object.c Merge pull request #4703 from gechunlin/unstable 2018-03-22 16:32:45 +01:00
pqsort.c No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
pqsort.h
pubsub.c Change indentation and other minor details of PR #4489. 2017-12-06 12:05:14 +01:00
quicklist.c quicklist: fix the return value of quicklistCount 2017-12-04 19:49:23 +08:00
quicklist.h quicklist: change the len of quicklist to unsigned long 2017-12-04 19:49:40 +08:00
rand.c Use 'void' for zero-argument functions 2014-08-08 10:05:32 +02:00
rand.h
rax.c Rax updated to latest antirez/rax commit. 2018-02-02 11:10:18 +01:00
rax.h Streams: implement stream object release. 2017-12-01 10:24:24 +01:00
rax_malloc.h Cluster: hash slots tracking using a radix tree. 2017-03-27 16:37:22 +02:00
rdb.c Don't expire keys while loading RDB from AOF preamble. 2018-05-29 12:37:42 +02:00
rdb.h Don't expire keys while loading RDB from AOF preamble. 2018-05-29 12:37:42 +02:00
redis-benchmark.c redis-benchmark: bugfix - handle zero liveclients in right way 2018-01-03 12:47:25 +08:00
redis-check-aof.c Correct proceding -> proceeding typo. 2017-07-14 22:53:14 +01:00
redis-check-rdb.c RDB: make RDB check aware of LFU/LRU opcodes. 2018-03-15 16:39:33 +01:00
redis-cli.c Merge pull request #4932 from 0xtonyxia/fix-redis-cli-set-prefer-memory-leak 2018-05-24 16:15:21 +02:00
redis-trib.rb Cluster: improve anti-affinity algo in redis-trib.rb. 2018-01-18 11:44:19 +01:00
redisassert.h Add panic() into redisassert.h. 2017-01-18 17:12:07 +01:00
redismodule.h Modules API: Add call to get the blocked client handle from the context. 2018-04-13 13:48:11 +02:00
release.c No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
replication.c Merge pull request #4269 from jianqingdu/unstable 2018-01-24 10:55:25 +01:00
rio.c fix processing of large bulks (above 2GB) 2017-12-29 12:24:19 +02:00
rio.h fix processing of large bulks (above 2GB) 2017-12-29 12:24:19 +02:00
scripting.c Change indentation and other minor details of PR #4489. 2017-12-06 12:05:14 +01:00
sds.c Merge pull request #3828 from oranagra/sdsnewlen_pr 2018-02-27 04:04:32 -08:00
sds.h Merge pull request #3828 from oranagra/sdsnewlen_pr 2018-02-27 04:04:32 -08: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 delay in detecting ODOWN. 2018-05-23 17:13:44 +02:00
server.c Active defrag fixes for 32bit builds 2018-05-17 09:52:00 +03:00
server.h ZPOP: change sync ZPOP to have a count argument instead of N keys. 2018-05-11 18:00:32 +02:00
setproctitle.c Fix undefined behavior constant defined. 2017-11-19 16:23:42 +00: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
siphash.c SipHash 2-4 -> SipHash 1-2. 2017-02-21 17:07:28 +01:00
slowlog.c Change indentation and other minor details of PR #4489. 2017-12-06 12:05:14 +01:00
slowlog.h Merge pull request #4056 from season89/unstable 2017-06-20 16:55:29 +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
stream.h Streams: iterator entry deletion abilities. 2018-04-17 17:18:00 +02:00
syncio.c syncWithMaster(): non blocking state machine. 2015-08-06 18:12:20 +02:00
t_hash.c Merge pull request #3745 from guybe7/unstable 2018-02-13 15:50:21 +01:00
t_list.c Make blocking list commands send keyspace notifications 2018-03-22 17:22:26 +07:00
t_set.c set: fix the int problem for qsort 2017-12-05 17:42:19 +08:00
t_stream.c Streams: fix comments referring to old ID format. 2018-05-25 17:25:19 +02:00
t_string.c Replication: fix the infamous key leakage of writable slaves + EXPIRE. 2016-12-13 10:59:54 +01:00
t_zset.c ZPOP: fix the wrong keyc, should be 1 2018-05-22 21:31:22 +08:00
testhelp.h
util.c Modules API: RM_GetRandomBytes() / GetRandomHexChars(). 2018-04-05 13:24:22 +02:00
util.h enlarged buffer given to ld2string 2017-01-11 19:24:19 +02:00
valgrind.sup
version.h Mark version of unstable branch in an unique way. 2015-09-29 17:30:24 +02:00
ziplist.c Fix ziplist prevlen encoding description. See #4705. 2018-02-23 12:19:35 +01:00
ziplist.h DEBUG: new "ziplist" subcommand added. Dumps a ziplist on stdout. 2016-12-16 09:02:50 +01: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 Active defrag fixes for 32bit builds 2018-05-17 09:52:00 +03:00
zmalloc.h Adding real allocator fragmentation to INFO and MEMORY command + active defrag test 2018-03-12 15:08:52 +02:00