• Wen Hui's avatar
    SRANDMEMBER RESP3 return should be Array, not Set (#8504) · f5235b2d
    Wen Hui authored
    
    
    SRANDMEMBER with negative count (non unique) can return the same member
    multiple times, and the order of elements in the returned collection matters.
    For these reasons returning a RESP3 Set type is not valid for the negative
    count, but also not really valid for the positive (unique) variant either (the
    command returns an array of random picks, not a set)
    
    This PR also contains a minor optimization for SRANDMEMBER, HRANDFIELD,
    and ZRANDMEMBER, to avoid the temporary dict from being rehashed while it grows.
    Co-authored-by: default avatarOran Agra <oran@redislabs.com>
    f5235b2d
t_zset.c 138 KB