mirror of
https://github.com/fluencelabs/redis
synced 2025-04-25 02:22:13 +00:00
Use cached time in expireCommand()
Should not be an issue given that the precision is the second here, at least if we are using a decent HZ value and the cached time refreshes enough times. So the cached time is only used if HZ is >= 10.
This commit is contained in:
parent
27db456332
commit
d57ac2c872
3
src/db.c
3
src/db.c
@ -956,7 +956,8 @@ void expireGenericCommand(redisClient *c, long long basetime, int unit) {
|
||||
}
|
||||
|
||||
void expireCommand(redisClient *c) {
|
||||
expireGenericCommand(c,mstime(),UNIT_SECONDS);
|
||||
long long now = server.hz >= 10 ? server.mstime: mstime();
|
||||
expireGenericCommand(c,now,UNIT_SECONDS);
|
||||
}
|
||||
|
||||
void expireatCommand(redisClient *c) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user