mirror of https://mirror.osredm.com/root/redis.git
Add appropriate comment
This commit is contained in:
parent
7e4a9ea07f
commit
6cf906e3ad
|
@ -946,7 +946,10 @@ void spopWithCountCommand(client *c) {
|
|||
}
|
||||
setTypeReleaseIterator(si);
|
||||
|
||||
/* Assign the new set as the key value (Also update KEYSIZES histogram) */
|
||||
/* Update key size histogram "explicitly" and not indirectly by dbReplaceValue()
|
||||
* since function dbReplaceValue() assumes the entire set is being replaced,
|
||||
* but here we're building the new set from the existing one. As a result,
|
||||
* the size of the old set has already changed by the time we reach this point. */
|
||||
updateKeysizesHist(c->db, getKeySlot(c->argv[1]->ptr), OBJ_SET, size, size-count);
|
||||
dbReplaceValue(c->db,c->argv[1],newset, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue