According to Redis documentation on PFADD command:
Return value Integer reply, specifically: 1 if at least 1 HyperLogLog internal register was altered. 0 otherwise.
Can anyone explain the following two points?
- Does this mean PFADD will return "1" if the counter was really incremented by 1? is it guaranteed that after running PFADD, the new PFCOUNT will be
PFCOUNT(before) + output of PFADD
? In other words, can a single-threaded client keep track of the count using only the output of PFADD? - When PFADD returns "0" or "1", do they translate to a "cache hit" and a "cache miss" respectively?