Commit 4c1b3add authored by antirez's avatar antirez
Browse files

Fix DEBUG OBJECT lru field to report seconds.

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.
parent 1490809f
...@@ -301,7 +301,7 @@ void debugCommand(redisClient *c) { ...@@ -301,7 +301,7 @@ void debugCommand(redisClient *c) {
"lru:%d lru_seconds_idle:%llu", "lru:%d lru_seconds_idle:%llu",
(void*)val, val->refcount, (void*)val, val->refcount,
strenc, (long long) rdbSavedObjectLen(val), 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) { } else if (!strcasecmp(c->argv[1]->ptr,"sdslen") && c->argc == 3) {
dictEntry *de; dictEntry *de;
robj *val; robj *val;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment