HLLADD: propagate write when only variable name is given.
The following form is given: HLLADD myhll No element is provided in the above case so if 'myhll' var does not exist the result is to just create an empty HLL structure, and no update will be performed on the registers. In this case, the DB should still be set dirty and the command propagated.
This commit is contained in:
parent
2c5201f83d
commit
1c8a0043dd
@ -440,6 +440,7 @@ void hllAddCommand(redisClient *c) {
|
|||||||
* is guaranteed to return bytes initialized to zero. */
|
* is guaranteed to return bytes initialized to zero. */
|
||||||
o = createObject(REDIS_STRING,sdsnewlen(NULL,REDIS_HLL_SIZE));
|
o = createObject(REDIS_STRING,sdsnewlen(NULL,REDIS_HLL_SIZE));
|
||||||
dbAdd(c->db,c->argv[1],o);
|
dbAdd(c->db,c->argv[1],o);
|
||||||
|
updated++;
|
||||||
} else {
|
} else {
|
||||||
/* Key exists, check type */
|
/* Key exists, check type */
|
||||||
if (checkType(c,o,REDIS_STRING))
|
if (checkType(c,o,REDIS_STRING))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user