Hello,
the answer to your question lies in the documentation for the return
value of PFADD:
"1 if at least 1 HyperLogLog internal register was altered. 0 otherwise."
The fact that the register was altered means that, if you call PFCOUNT
again, the result MAY be different compared to the last time, however
if it's really different or not, and in which way, is not specified.
So the number of 1s returned has nothing to do with the final count.
Cheers,
Salvatore
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
redis-db+u...@googlegroups.com.
> To post to this group, send email to
redi...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/redis-db.
> For more options, visit
https://groups.google.com/d/optout.
--
Salvatore 'antirez' Sanfilippo
open source developer - Redis Labs
https://redislabs.com
"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.