mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Prevents OBJECT freq
with noeviction
When maxmemory is set to noeviction, idletime is implicitly kept. This renders access frequency nonsensical.
This commit is contained in:
parent
57bd8feb8d
commit
b28fb3d753
@ -1035,8 +1035,8 @@ void objectCommand(client *c) {
|
|||||||
} else if (!strcasecmp(c->argv[1]->ptr,"freq") && c->argc == 3) {
|
} else if (!strcasecmp(c->argv[1]->ptr,"freq") && c->argc == 3) {
|
||||||
if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
|
if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
|
||||||
== NULL) return;
|
== NULL) return;
|
||||||
if (server.maxmemory_policy & MAXMEMORY_FLAG_LRU) {
|
if (!(server.maxmemory_policy & MAXMEMORY_FLAG_LFU)) {
|
||||||
addReplyError(c,"An LRU maxmemory policy is selected, access frequency not tracked. Please note that when switching between policies at runtime LRU and LFU data will take some time to adjust.");
|
addReplyError(c,"A non-LFU maxmemory policy is selected, access frequency not tracked. Please note that when switching between policies at runtime LRU and LFU data will take some time to adjust.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
addReplyLongLong(c,o->lru&255);
|
addReplyLongLong(c,o->lru&255);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user