1. 09 Apr, 2020 1 commit
    • antirez's avatar
      RDB: load files faster avoiding useless free+realloc. · 30adc622
      antirez authored
      Reloading of the RDB generated by
      
          DEBUG POPULATE 5000000
          SAVE
      
      is now 25% faster.
      
      This commit also prepares the ability to have more flexibility when
      loading stuff from the RDB, since we no longer use dbAdd() but can
      control exactly how things are added in the database.
      30adc622
  2. 07 Apr, 2020 1 commit
    • antirez's avatar
      Speedup INFO by counting client memory incrementally. · f6987628
      antirez authored
      Related to #5145.
      
      Design note: clients may change type when they turn into replicas or are
      moved into the Pub/Sub category and so forth. Moreover the recomputation
      of the bytes used is problematic for obvious reasons: it changes
      continuously, so as a conservative way to avoid accumulating errors,
      each client remembers the contribution it gave to the sum, and removes
      it when it is freed or before updating it with the new memory usage.
      f6987628
  3. 01 Apr, 2020 1 commit
  4. 31 Mar, 2020 2 commits
    • Guy Benoish's avatar
      Modules: Test MULTI/EXEC replication of RM_Replicate · d6eb3afd
      Guy Benoish authored
      Makse sure call() doesn't wrap replicated commands with
      a redundant MULTI/EXEC
      
      Other, unrelated changes:
      1. Formatting compiler warning in INFO CLIENTS
      2. Use CLIENT_ID_AOF instead of UINT64_MAX
      d6eb3afd
    • antirez's avatar
      Fix module commands propagation double MULTI bug. · 9dcf878f
      antirez authored
      37a10cef introduced automatic wrapping of MULTI/EXEC for the
      alsoPropagate API. However this collides with the built-in mechanism
      already present in module.c. To avoid complex changes near Redis 6 GA
      this commit introduces the ability to exclude call() MUTLI/EXEC wrapping
      for also propagate in order to continue to use the old code paths in
      module.c.
      9dcf878f
  5. 27 Mar, 2020 6 commits
  6. 25 Mar, 2020 1 commit
    • antirez's avatar
      PSYNC2: meaningful offset implemented. · 57fa355e
      antirez authored
      A very commonly signaled operational problem with Redis master-replicas
      sets is that, once the master becomes unavailable for some reason,
      especially because of network problems, many times it wont be able to
      perform a partial resynchronization with the new master, once it rejoins
      the partition, for the following reason:
      
      1. The master becomes isolated, however it keeps sending PINGs to the
      replicas. Such PINGs will never be received since the link connection is
      actually already severed.
      2. On the other side, one of the replicas will turn into the new master,
      setting its secondary replication ID offset to the one of the last
      command received from the old master: this offset will not include the
      PINGs sent by the master once the link was already disconnected.
      3. When the master rejoins the partion and is turned into a replica, its
      offset will be too advanced because of the PINGs, so a PSYNC will fail,
      and a full synchronization will be required.
      
      Related to issue #7002 and other discussion we had in the past around
      this problem.
      57fa355e
  7. 18 Mar, 2020 1 commit
    • WuYunlong's avatar
      Fix master replica inconsistency for upgrading scenario. · f6029fb9
      WuYunlong authored
      Before this commit, when upgrading a replica, expired keys will not
      be loaded, thus causing replica having less keys in db. To this point,
      master and replica's keys is logically consistent. However, before
      the keys in master and replica are physically consistent, that is,
      they have the same dbsize, if master got a problem and the replica
      got promoted and becomes new master of that partition, and master
      updates a key which does not exist on master, but physically exists
      on the old master(new replica), the old master would refuse to update
      the key, thus causing master and replica data inconsistent.
      
      How could this happen?
      That's all because of the wrong judgement of roles while starting up
      the server. We can not use server.masterhost to judge if the server
      is master or replica, since it fails in cluster mode.
      
      When we start the server, we load rdb and do want to load expired keys,
      and do not want to have the ability to active expire keys, if it is
      a replica.
      f6029fb9
  8. 16 Mar, 2020 1 commit
  9. 04 Mar, 2020 2 commits
  10. 03 Mar, 2020 1 commit
  11. 24 Feb, 2020 1 commit
  12. 19 Feb, 2020 1 commit
  13. 11 Feb, 2020 2 commits
  14. 10 Feb, 2020 1 commit
  15. 07 Feb, 2020 2 commits
  16. 06 Feb, 2020 1 commit
    • Guy Benoish's avatar
      Diskless-load emptyDb-related fixes · 92dc5e1f
      Guy Benoish authored
      1. Call emptyDb even in case of diskless-load: We want modules
         to get the same FLUSHDB event as disk-based replication.
      2. Do not fire any module events when flushing the backups array.
      3. Delete redundant call to signalFlushedDb (Called from emptyDb).
      92dc5e1f
  17. 05 Feb, 2020 1 commit
  18. 04 Feb, 2020 2 commits
  19. 03 Feb, 2020 1 commit
    • Guy Benoish's avatar
      Exclude "keymiss" notification from NOTIFY_ALL · 2fda5f5c
      Guy Benoish authored
      Because "keymiss" is "special" compared to the rest of
      the notifications (Trying not to break existing apps
      using the 'A' format for notifications)
      
      Also updated redis.conf and module.c docs
      2fda5f5c
  20. 02 Feb, 2020 1 commit
  21. 28 Jan, 2020 1 commit
  22. 27 Jan, 2020 1 commit
  23. 20 Jan, 2020 1 commit
    • srzhao's avatar
      Check OOM at script start to get stable lua OOM state. · 38f6207f
      srzhao authored
      Checking OOM by `getMaxMemoryState` inside script might get different result
      with `freeMemoryIfNeededAndSafe` at script start, because lua stack and
      arguments also consume memory.
      
      This leads to memory `borderline` when memory grows near server.maxmemory:
      
      - `freeMemoryIfNeededAndSafe` at script start detects no OOM, no memory freed
      - `getMaxMemoryState` inside script detects OOM, script aborted
      
      We solve this 'borderline' issue by saving OOM state at script start to get
      stable lua OOM state.
      
      related to issue #6565 and #5250.
      38f6207f
  24. 23 Dec, 2019 1 commit
  25. 18 Dec, 2019 3 commits
  26. 17 Dec, 2019 3 commits