Skip to content

Commit

Permalink
Fix DEBUG OBJECT lru field to report seconds.
Browse files Browse the repository at this point in the history
Because of (not so) recent Redis changes, now the LRU internally
reported unit is milliseconds, not seconds, but the DEBUG OBJECT output
was still claiming seconds while providing milliseconds.
However OBJECT IDLETIME was working as expected, which is the correct
API to use.
  • Loading branch information
antirez committed Nov 26, 2014
1 parent 1490809 commit 4c1b3ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void debugCommand(redisClient *c) {
"lru:%d lru_seconds_idle:%llu",
(void*)val, val->refcount,
strenc, (long long) rdbSavedObjectLen(val),
val->lru, estimateObjectIdleTime(val));
val->lru, estimateObjectIdleTime(val)/1000);
} else if (!strcasecmp(c->argv[1]->ptr,"sdslen") && c->argc == 3) {
dictEntry *de;
robj *val;
Expand Down

0 comments on commit 4c1b3ad

Please sign in to comment.