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

Fast path in SET if the expiration time is expired #865

Merged
merged 8 commits into from
Aug 31, 2024

Commits on Aug 2, 2024

  1. Fast path in SET if the expiration time is expired

    If the expiration time passed in SET is expired, for example, it
    has expired due to the machine time (DTS) or the expiration time
    passed in (wrong arg). In this case, we don't need to set the key
    and wait for the active expire scan before deleting the key.
    
    Compared with previous changes:
    1. If the key does not exist, previously we would set the key and wait
    for the active expire to delete it, so it is a set + del from the perspective
    of propaganda. Now we will no set the key and return, so it a NOP.
    
    2. If the key exists, previously we woule set the key and wait
    for the active expire to delete it, so it is a set + del From the perspective
    of propaganda. Now we will delete it and return, so it is a del.
    
    A simple benchmark test:
    ```
    ./src/valkey-benchmark -P 32 -c 100 -n 10000000 -r 1000000000 set __rand_int__ value exat 100
    
    old: 252474.23, new: 829256.12
    ```
    
    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    db5349d View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. adding deleteExpiredKeyFromOverwriteAndPropagate

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    4a742cb View commit details
    Browse the repository at this point in the history
  2. add back tick to milliseconds comment

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    33eb3b5 View commit details
    Browse the repository at this point in the history
  3. fix test

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    73cde7a View commit details
    Browse the repository at this point in the history
  4. leave restore alone

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    e9e089b View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. Merge remote-tracking branch 'upstream/unstable' into set_expire

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    fef9cc9 View commit details
    Browse the repository at this point in the history
  2. remove do_delete arg

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    c7f74af View commit details
    Browse the repository at this point in the history
  3. Update src/cluster.c

    Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin and madolson authored Aug 23, 2024
    Configuration menu
    Copy the full SHA
    58c086c View commit details
    Browse the repository at this point in the history