• luvine's avatar
    HSETNX can lead coding type change even when skipped due to NX (#4615) · 4278c45c
    luvine authored
    1. Add one key-value pair to myhash, which the length of key and value both less than hash-max-ziplist-value, for example:
    >hset myhash key value
    2. Then execute the following command
    >hsetnx myhash key value1 (the length greater than hash-max-ziplist-value)
    3. This will add nothing, but the code type of "myhash" changed from ziplist to dict even there are only one key-value pair in "myhash", and both of them less than hash-max-ziplist-value.
    4278c45c
t_hash.c 39.8 KB