mirror of
https://github.com/fluencelabs/redis
synced 2025-04-25 18:42: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
cd05a665dc
commit
aaac257147
3
src/db.c
3
src/db.c
@ -912,7 +912,8 @@ void expireGenericCommand(redisClient *c, long long basetime, int unit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void expireCommand(redisClient *c) {
|
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) {
|
void expireatCommand(redisClient *c) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user