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

HLLCOUNT is technically a write command

When we update the cached value, we need to propagate the command and
signal the key as modified for WATCH.
parent 8aeb0c19
......@@ -522,6 +522,12 @@ void hllCountCommand(redisClient *c) {
registers[REDIS_HLL_SIZE-3] = (card >> 40) & 0xff;
registers[REDIS_HLL_SIZE-2] = (card >> 48) & 0xff;
registers[REDIS_HLL_SIZE-1] = (card >> 56) & 0xff;
/* This is not considered a read-only command even if the
* data structure is not modified, since the cached value
* may be modified and given that the HLL is a Redis string
* we need to propagate the change. */
signalModifiedKey(c->db,c->argv[1]);
server.dirty++;
}
addReplyLongLong(c,card);
}
......
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