Files
redis/src
zhaozhao.zz e542132b07 expires: refactoring judgment about whether a key is expired
Calling lookupKey*() many times to search a key in one command
may get different result.

That's because lookupKey*() calls expireIfNeeded(), and delete
the key when reach the expire time. So we can get an robj before
the expire time, but a NULL after the expire time.

The worst is that may lead to Redis crash, for example
`RPOPLPUSH foo foo` the first time we get a list form `foo` and
hold the pointer, but when we get `foo` again it's expired and
deleted. Now we hold a freed memory, when execute rpoplpushHandlePush()
redis crash.

To fix it, we can refactor the judgment about whether a key is expired,
using the same basetime `server.cmd_start_mstime` instead of calling
mstime() everytime.
2019-11-05 09:56:39 +01:00
..
2016-06-07 16:46:00 -04:00
2018-10-05 18:29:23 +02:00
2015-10-01 13:02:25 +02:00
2019-04-09 09:24:22 +08:00
2019-07-17 16:40:24 +03:00
2018-11-25 08:10:26 +00:00
2019-10-07 09:09:32 +03:00
2018-07-03 18:19:46 +02:00
2019-10-07 09:09:32 +03:00
2019-10-08 17:09:37 +02:00
2016-07-27 11:34:25 +02:00
2019-02-24 21:38:15 +01:00
2018-10-17 12:57:21 +02:00
2019-09-17 06:18:01 +09:00
2019-10-24 14:24:55 +03:00
2019-10-24 14:24:55 +03:00
2018-07-13 09:46:30 -06:00
2019-10-16 17:31:02 +03:00
2018-07-03 18:19:46 +02:00
2014-08-08 10:05:32 +02:00
2019-10-07 09:09:32 +03:00
2019-07-22 21:15:33 +03:00
2019-10-25 22:31:55 +09:00
2018-07-03 18:19:46 +02:00
2019-10-02 11:30:20 +02:00
2018-11-11 18:49:55 +00:00
2015-04-27 12:07:49 +02:00
2015-04-27 12:07:49 +02:00
2014-07-02 16:31:22 +02:00
2019-10-07 11:01:01 -07:00
2019-01-09 17:00:29 +01:00
2018-12-11 13:29:30 +01:00
2019-05-08 12:53:56 +08:00