When +inf and -inf are added, the result is NaN. We don't want NaN scores in a sorted set, so agreed on the result of this operation being zero.
even when the list is swapped out and in again.
In order to trigger the bug what's needed is to call ZINTERSTORE resulting into an empty set created, bug against a key that already existed. The command was not propagated, so the replica ended with the key that the master removed. Sequence of command to reproduce: redis-cli hset 446 34 905 redis-cli hset 446 393 911 redis-cli zadd 966 0.085412045980529885 652 redis-cli zadd 645 0.25081839284432045 280 redis-cli zinterstore 446 2 966 645
…tion test now is able to save the two datasets in CSV when an inconsistency is detected.
…rnings for malloc/free usages. We always want to use our zmalloc/zfree versions for memory usage tracking
calloc is more effecient than malloc+memset when the system uses mmap to allocate memory. mmap always returns zeroed memory so the memset can be avoided. The threshold to use mmap is 16k in osx libc and 128k in bsd libc and glibc. The kernel can lazily allocate the pages, this reduces memory usage when we have a page table or hash table that is mostly empty. This change is most visible when you start a new redis instance with vm enabled. You'll see no increased memory usage no matter how big your page table is.
…s needed later on
…bjectFromLongLong. Fixed as well.
…n instability of VM introduced with the new object sharing code