This commit is contained in:
chx9 2024-10-09 21:05:29 +08:00
parent 472d8a0df5
commit 9f9dde02d1
1 changed files with 1 additions and 1 deletions

View File

@ -1411,7 +1411,7 @@ int objectSetLRUOrLFU(robj *val, long long lfu_freq, long long lru_idle,
lru_idle = lru_idle*lru_multiplier/LRU_CLOCK_RESOLUTION; lru_idle = lru_idle*lru_multiplier/LRU_CLOCK_RESOLUTION;
long lru_abs = lru_clock - lru_idle; /* Absolute access time. */ long lru_abs = lru_clock - lru_idle; /* Absolute access time. */
/* If the LRU field underflows (since lru_clock is a wrapping clock), /* If the LRU field underflows (since lru_clock is a wrapping clock),
* we need to make it positive again. This be handled by the unwrapping * we need to make it positive again. This will be handled by the unwrapping
* code in estimateObjectIdleTime. I.e. imagine a day when lru_clock * code in estimateObjectIdleTime. I.e. imagine a day when lru_clock
* wrap arounds (happens once in some 6 months), and becomes a low * wrap arounds (happens once in some 6 months), and becomes a low
* value, like 10, an lru_idle of 1000 should be near LRU_CLOCK_MAX. */ * value, like 10, an lru_idle of 1000 should be near LRU_CLOCK_MAX. */