• sundb's avatar
    Fix random probability check in ziplistRandomPairsUnique (#8467) · 1f12be30
    sundb authored
    When (remaining == (total_size - index)), element will definitely be random to.
    But when rand() == RAND_MAX, the element will miss, this will trigger assert
    in serverAssert(ziplistRandomPairsUnique(zsetobj->ptr, count, keys, vals) == count).
    1f12be30
ziplist.c 90.7 KB