Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash in zset store getkeys, fix zdiff/bzmpop range, add tests #2051

Merged
merged 2 commits into from
Jan 25, 2024

Commits on Jan 25, 2024

  1. Fix crash in zset store getkeys, fix zdiff/bzmpop range, add tests

    These following cases will crash the server, the reason is that
    the index of numkeys is wrong:
    ```
    command getkeys zdiffstore dst 2 src1 src2
    command getkeys zinterstore dst 2 src1 src2
    command getkeys zunionstore dst 2 src1 src2
    ```
    
    These following getkeys output is wrong:
    ```
    > command getkeys zdiff 2 key1 key2
    1) "key1"
    2) "key2"
    3) (nil)
    
    > command getkeys bzmpop 0 2 key1 key2
    1) "key1"
    ```
    
    These are ok:
    ```
    command getkeys zinter 2 key1 key2
    command getkeys zunion 2 key1 key2
    command getkeys sintercard 2 key1 key2
    command getkeys zintercard 2 key1 key2
    command getkeys zmpop 2 key1 key2
    command getkeys lmpop 2 key1 key2
    command getkeys blmpop 0 2 key1 key2
    ```
    
    However, at present, there is still a problem with our zset store.
    We do not support returning dst key, but let's do it later...
    ```
    127.0.0.1:6379> command getkeys zinterstore dst 2 src1 src2
    1) "dst"
    2) "src1"
    3) "src2"
    
    127.0.0.1:6666> command getkeys zinterstore dst 2 src1 src2
    1) "src1"
    2) "src2"
    ```
    enjoy-binbin committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    16f8e96 View commit details
    Browse the repository at this point in the history
  2. space -> tab

    enjoy-binbin committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    51f4b7e View commit details
    Browse the repository at this point in the history