1. 20 Mar, 2024 1 commit
  2. 23 Nov, 2022 1 commit
    • Mingyi Kang's avatar
      optimize unwatchAllKeys() (#11511) · 3b462ce5
      Mingyi Kang authored
      In unwatchAllKeys() function, we traverse all the keys watched by the client,
      and for each key we need to remove the client from the list of clients watching that key.
      This is implemented by listSearchKey which traverses the list of clients.
      
      If we can reach the node of the list of clients from watchedKey in O(1) time,
      then we do not need to call listSearchKey anymore.
      
      Changes in this PR: put the node of the list of clients of each watched key in the
      db inside the watchedKey structure. In this way, for every key watched by the client,
      we can get the watchedKey structure and then reach the node in the list of clients in
      db->watched_keys to remove it from that list.
      From the perspective of the list of clients watching the key, the list node is inside a
      watchedKey structure, so we can get to the watchedKey struct from the listnode by
      struct member offset math. And because of this, node->value is not used, we can point
      node->value to the list itself, so that we don't need to fetch the list of clients from the dict.
      3b462ce5
  3. 15 Sep, 2022 1 commit
  4. 08 Apr, 2020 1 commit
  5. 13 Nov, 2019 1 commit
  6. 02 May, 2017 1 commit
  7. 27 Apr, 2017 1 commit
    • antirez's avatar
      PSYNC2: fix master cleanup when caching it. · 469d6e2b
      antirez authored
      The master client cleanup was incomplete: resetClient() was missing and
      the output buffer of the client was not reset, so pending commands
      related to the previous connection could be still sent.
      
      The first problem caused the client argument vector to be, at times,
      half populated, so that when the correct replication stream arrived the
      protcol got mixed to the arugments creating invalid commands that nobody
      called.
      
      Thanks to @yangsiran for also investigating this problem, after
      already providing important design / implementation hints for the
      original PSYNC2 issues (see referenced Github issue).
      
      Note that this commit adds a new function to the list library of Redis
      in order to be able to reset a list without destroying it.
      
      Related to issue #3899.
      469d6e2b
  8. 08 Nov, 2012 1 commit
  9. 13 Mar, 2012 1 commit
  10. 31 Jan, 2012 1 commit
  11. 01 Jul, 2010 1 commit
    • antirez's avatar
      redis.c split into many different C files. · e2641e09
      antirez authored
      networking related stuff moved into networking.c
      
      moved more code
      
      more work on layout of source code
      
      SDS instantaneuos memory saving. By Pieter and Salvatore at VMware ;)
      
      cleanly compiling again after the first split, now splitting it in more C files
      
      moving more things around... work in progress
      
      split replication code
      
      splitting more
      
      Sets split
      
      Hash split
      
      replication split
      
      even more splitting
      
      more splitting
      
      minor change
      e2641e09
  12. 11 Jun, 2010 1 commit
  13. 19 Feb, 2010 1 commit
  14. 13 Jan, 2010 1 commit
  15. 20 Apr, 2009 1 commit
  16. 22 Mar, 2009 1 commit