1. 22 Nov, 2023 6 commits
  2. 21 Nov, 2023 3 commits
  3. 20 Nov, 2023 1 commit
  4. 19 Nov, 2023 3 commits
    • Hwang Si Yeon's avatar
      Add an explanation for URI with -u in redis-cli --help (#12751) · a1f91ffa
      Hwang Si Yeon authored
      Add documentation of the URI format in the `--help` output of
      `redis-cli` and `redis-benchmark`.
      
      In particular, it's good for users to know that they need to specify
      "default" as the username when authenticating without a username. Other
      details of the URI format are described too, like scheme and dbnum.
      
      It used to be possible to connect to Redis using an URL with an empty
      username, like `redis-cli -u redis://:PASSWORD@localhost:6379/0`. This
      was broken in 6.2 (#8048), and there was a discussion about it #9186.
      Now, users need to specify "default" as the username and it's better to
      document it.
      
      Refer to #12746 for more details.
      a1f91ffa
    • Wen Hui's avatar
      Adding missing SWAPDB related test cases. (#12769) · 5a1f4b9a
      Wen Hui authored
      We have some test cases of swapdb with watchkey but missing seperate
      basic swapdb test cases, unhappy path and flushdb after swapdb. So added
      the test cases in keyspace.tcl.
      5a1f4b9a
    • Binbin's avatar
      Fix timing issue in CLUSTER SLAVE / REPLICAS consistent test (#12774) · 3d9c427f
      Binbin authored
      CI reports that this test failed, the reason is because during
      the command processing, the node processed PING/PONG, resulting
      in ping_sent or pong_received mismatch.
      
      Change to use MULTI to avoid timing issue. The test was introduced
      in #12224.
      3d9c427f
  5. 17 Nov, 2023 2 commits
  6. 16 Nov, 2023 1 commit
  7. 15 Nov, 2023 1 commit
    • Binbin's avatar
      Empty rehashing list in emptyDbStructure (#12764) · 4366bbaa
      Binbin authored
      This is currently harmless, since we have already cleared the dict
      before, it will reset the rehashidx to -1, and in incrementallyRehash
      we will call dictIsRehashing to check.
      
      It would be nice to empty the list to avoid meaningless attempts, and
      the code is also unified to reduce misunderstandings.
      4366bbaa
  8. 14 Nov, 2023 1 commit
    • Binbin's avatar
      Fix DB iterator not resetting pauserehash causing dict being unable to rehash (#12757) · fe363063
      Binbin authored
      When using DB iterator, it will use dictInitSafeIterator to init a old safe
      dict iterator. When dbIteratorNext is used, it will jump to the next slot db
      dict when we are done a dict. During this process, we do not have any calls to
      dictResumeRehashing, which causes the dict's pauserehash to always be > 0.
      
      And at last, it will be returned directly in dictRehashMilliseconds, which causes
      us to have slot dict in a state where rehash cannot be completed.
      
      In the "expire scan should skip dictionaries with lot's of empty buckets" test,
      adding a `keys *` can reproduce the problem stably. `keys *` will call dbIteratorNext
      to trigger a traversal of all slot dicts.
      
      Added dbReleaseIterator and dbIteratorInitNextSafeIterator methods to call dictResetIterator.
      Issue was introduced in #11695.
      fe363063
  9. 13 Nov, 2023 1 commit
  10. 12 Nov, 2023 1 commit
    • Roshan Khatri's avatar
      Add DEBUG_ASSERTIONS option to custom assert (#12667) · 88e83e51
      Roshan Khatri authored
      This PR introduces a new macro, serverAssertWithInfoDebug, to do complex assertions only for debugging. The main intention is to allow running complex operations during tests without impacting runtime performance. This assertion is enabled when setting DEBUG_ASSERTIONS.
      
      The DEBUG_ASSERTIONS flag is set for the daily and CI variants of `test-sanitizer-address`.
      88e83e51
  11. 11 Nov, 2023 1 commit
    • Harkrishn Patro's avatar
      Increase timeout for expiry cluster tests (#12752) · 9ca84903
      Harkrishn Patro authored
      Test recently added fails on timeout in valgrind in GH actions.
      
      Locally with valgrind the test finishes within 1.5 sec(s). Couldn't find
      any issue due to lack of reproducibility. Increasing the timeout and
      adding an additional log to the test to understand how many keys
      were left at the end.
      9ca84903
  12. 10 Nov, 2023 1 commit
  13. 09 Nov, 2023 1 commit
  14. 08 Nov, 2023 2 commits
    • Binbin's avatar
      Fix genClusterDebugString minor sds leaks (#12739) · 53294e53
      Binbin authored
      This function now will only be called in printCrashReport,
      so this is just a cleanup.
      53294e53
    • Meir Shpilraien (Spielrein)'s avatar
      Before evicted and before expired server events are not executed inside an execution unit. (#12733) · 0ffb9d2e
      Meir Shpilraien (Spielrein) authored
      Redis 7.2 (#9406) introduced a new modules event, `RedisModuleEvent_Key`.
      This new event allows the module to read the key data just before it is removed
      from the database (either deleted, expired, evicted, or overwritten).
      
      When the key is removed from the database, either by active expire or eviction.
      The new event was not called as part of an execution unit. This can cause an
      issue if the module registers a post notification job inside the event. This job will
      not be executed atomically with the expiration/eviction operation and will not
      replicated inside a Multi/Exec. Moreover, the post notification job will be executed
      right after the event where it is still not safe to perform any write operation, this will
      violate the promise that post notification job will be called atomically with the
      operation that triggered it and **only when it is safe to write**.
      
      This PR fixes the issue by wrapping each expiration/eviction of a key with an execution
      unit. This makes sure the entire operation will run atomically and all the post notification
      jobs will be executed at the end where it is safe to write.
      
      Tests were modified to verify the fix.
      0ffb9d2e
  15. 06 Nov, 2023 3 commits
  16. 05 Nov, 2023 1 commit
    • Wen Hui's avatar
      Fix the bug that write redis sensitive command information to redis_cli historyfile (#11489) · 28b6155b
      Wen Hui authored
      Currently, we do not write the following sensitive commands into the ~/.rediscli_history file:
      
      ACL SETUSER username [rule [rule ...]]
      AUTH [username] password
      HELLO [AUTH username password] 
      MIGRATE host port <key | ""> destination-db timeout [[AUTH password | AUTH2 username password]]
      CONFIG SET masterauth master-password
      CONFIG SET masteruser username
      CONFIG SET requirepass foobared
      
      However, we still write the following sensitive commands into the ~/.rediscli_history file:
      ACL GETUSER username
      Sentinel CONFIG set sentinel-pass password
      Sentinel CONFIG set sentinel-user username
      Sentinel set mastername auth-pass password
      Sentinel set mastername auth-user username
      
      This change adds the commands of the second list to be skipped from being written to the history file.
      
      28b6155b
  17. 02 Nov, 2023 2 commits
  18. 01 Nov, 2023 2 commits
  19. 31 Oct, 2023 2 commits
  20. 28 Oct, 2023 1 commit
  21. 27 Oct, 2023 2 commits
    • Harkrishn Patro's avatar
      Reduce dbBuckets operation time complexity from O(N) to O(1) (#12697) · 4145d628
      Harkrishn Patro authored
      
      
      As part of #11695 independent dictionaries were introduced per slot.
      Time complexity to discover total no. of buckets across all dictionaries
      increased to O(N) with straightforward implementation of iterating over
      all dictionaries and adding dictBuckets of each.
      
      To optimize the time complexity, we could maintain a global counter at
      db level to keep track of the count of buckets and update it on the start
      and end of rehashing.
      
      ---------
      Co-authored-by: default avatarRoshan Khatri <rvkhatri@amazon.com>
      4145d628
    • Roshan Khatri's avatar
      Reset later item flag after defrag later is done (#12694) · 7d68208a
      Roshan Khatri authored
      Fixing issues described in #12672, started after #11695
      Related to #12674
      
      Fixes the `defrag didn't stop' issue.
      
      In some cases of how the keys were stored in memory
      defrag_later_item_in_progress was not getting reset once we finish
      defragging the later items and we move to the next slot. This stopped
      the scan to happen in the later slots and did not get 
      7d68208a
  22. 25 Oct, 2023 1 commit
  23. 24 Oct, 2023 1 commit