1. 18 6月, 2020 1 次提交
  2. 10 6月, 2020 2 次提交
  3. 08 6月, 2020 1 次提交
    • O
      Avoid rejecting WATCH / UNWATCH, like MULTI/EXEC/DISCARD · 2fa077b0
      Oran Agra 提交于
      Much like MULTI/EXEC/DISCARD, the WATCH and UNWATCH are not actually
      operating on the database or server state, but instead operate on the
      client state. the client may send them all in one long pipeline and check
      all the responses only at the end, so failing them may lead to a
      mismatch between the client state on the server and the one on the
      client end, and execute the wrong commands (ones that were meant to be
      discarded)
      
      the watched keys are not actually stored in the client struct, but they
      are in fact part of the client state. for instance, they're not cleared
      or moved in SWAPDB or FLUSHDB.
      2fa077b0
  4. 27 5月, 2020 1 次提交
    • A
      Remove the meaningful offset feature. · 22472fe5
      antirez 提交于
      After a closer look, the Redis core devleopers all believe that this was
      too fragile, caused many bugs that we didn't expect and that were very
      hard to track. Better to find an alternative solution that is simpler.
      22472fe5
  5. 14 5月, 2020 2 次提交
  6. 12 5月, 2020 1 次提交
  7. 11 5月, 2020 1 次提交
    • O
      fix redis 6.0 not freeing closed connections during loading. · 905e28ee
      Oran Agra 提交于
      This bug was introduced by a recent change in which readQueryFromClient
      is using freeClientAsync, and despite the fact that now
      freeClientsInAsyncFreeQueue is in beforeSleep, that's not enough since
      it's not called during loading in processEventsWhileBlocked.
      furthermore, afterSleep was called in that case but beforeSleep wasn't.
      
      This bug also caused slowness sine the level-triggered mode of epoll
      kept signaling these connections as readable causing us to keep doing
      connRead again and again for ll of these, which keep accumulating.
      
      now both before and after sleep are called, but not all of their actions
      are performed during loading, some are only reserved for the main loop.
      
      fixes issue #7215
      905e28ee
  8. 05 5月, 2020 2 次提交
  9. 03 5月, 2020 1 次提交
  10. 02 5月, 2020 1 次提交
    • Z
      Support setcpuaffinity on linux/bsd · 1a0deab2
      zhenwei pi 提交于
      Currently, there are several types of threads/child processes of a
      redis server. Sometimes we need deeply optimise the performance of
      redis, so we would like to isolate threads/processes.
      
      There were some discussion about cpu affinity cases in the issue:
      https://github.com/antirez/redis/issues/2863
      
      So implement cpu affinity setting by redis.conf in this patch, then
      we can config server_cpulist/bio_cpulist/aof_rewrite_cpulist/
      bgsave_cpulist by cpu list.
      
      Examples of cpulist in redis.conf:
      server_cpulist 0-7:2      means cpu affinity 0,2,4,6
      bio_cpulist 1,3           means cpu affinity 1,3
      aof_rewrite_cpulist 8-11  means cpu affinity 8,9,10,11
      bgsave_cpulist 1,10-11    means cpu affinity 1,10,11
      
      Test on linux/freebsd, both work fine.
      Signed-off-by: Nzhenwei pi <pizhenwei@bytedance.com>
      1a0deab2
  11. 29 4月, 2020 2 次提交
    • A
      Comment clearly why we moved some code in #6623. · d2a6c5ff
      antirez 提交于
      d2a6c5ff
    • S
      fix pipelined WAIT performance issue. · 4024bc7e
      srzhao 提交于
      If client gets blocked again in `processUnblockedClients`, redis will not send
      `REPLCONF GETACK *` to slaves untill next eventloop, so the client will be
      blocked for 100ms by default(10hz) if no other file event fired.
      
      move server.get_ack_from_slaves sinppet after `processUnblockedClients`, so
      that both the first WAIT command that puts client in blocked context and the
      following WAIT command processed in processUnblockedClients would trigger
      redis-sever to send `REPLCONF GETACK *`, so that the eventloop would get
      `REPLCONG ACK <reploffset>` from slaves and unblocked ASAP.
      4024bc7e
  12. 28 4月, 2020 3 次提交
    • O
      hickup, re-fix dictEncObjKeyCompare · 9a3dab0a
      Oran Agra 提交于
      come to think of it, in theory (not in practice), getDecodedObject can
      return the same original object with refcount incremented, so the
      pointer comparision in the previous commit was invalid.
      so now instead of checking the encoding, we explicitly check the
      refcount.
      9a3dab0a
    • A
      Rework comment in dictEncObjKeyCompare(). · 31781e97
      antirez 提交于
      31781e97
    • O
      allow dictFind using static robj · 09a5c078
      Oran Agra 提交于
      since the recent addition of OBJ_STATIC_REFCOUNT and the assertion in
      incrRefCount it is now impossible to use dictFind using a static robj,
      because dictEncObjKeyCompare will call getDecodedObject which tries to
      increment the refcount just in order to decrement it later.
      09a5c078
  13. 27 4月, 2020 1 次提交
  14. 25 4月, 2020 1 次提交
  15. 24 4月, 2020 1 次提交
    • A
      LCS -> STRALGO LCS. · 8a7f255c
      antirez 提交于
      STRALGO should be a container for mostly read-only string
      algorithms in Redis. The algorithms should have two main
      characteristics:
      
      1. They should be non trivial to compute, and often not part of
      programming language standard libraries.
      2. They should be fast enough that it is a good idea to have optimized C
      implementations.
      
      Next thing I would love to see? A small strings compression algorithm.
      8a7f255c
  16. 21 4月, 2020 1 次提交
  17. 17 4月, 2020 1 次提交
  18. 08 4月, 2020 1 次提交
  19. 07 4月, 2020 1 次提交
    • A
      Speedup INFO by counting client memory incrementally. · f6987628
      antirez 提交于
      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
  20. 02 4月, 2020 1 次提交
    • G
      Stale replica should allow MULTI/EXEC · 85a0d29d
      Guy Benoish 提交于
      Example: Client uses a pipe to send the following to a
      stale replica:
      
      MULTI
      .. do something ...
      DISCARD
      
      The replica will reply the MUTLI with -MASTERDOWN and
      execute the rest of the commands... A client using a
      pipe might not be aware that MULTI failed until it's
      too late.
      
      I can't think of a reason why MULTI/EXEC/DISCARD should
      not be executed on stale replicas...
      
      Also, enable MULTI/EXEC/DISCARD during loading
      85a0d29d
  21. 01 4月, 2020 2 次提交
    • A
      LCS: initial functionality implemented. · 1010c1b4
      antirez 提交于
      1010c1b4
    • G
      Fix memory corruption in moduleHandleBlockedClients · c4dc5b80
      Guy Benoish 提交于
      By using a "circular BRPOPLPUSH"-like scenario it was
      possible the get the same client on db->blocking_keys
      twice (See comment in moduleTryServeClientBlockedOnKey)
      
      The fix was actually already implememnted in
      moduleTryServeClientBlockedOnKey but it had a bug:
      the funxction should return 0 or 1 (not OK or ERR)
      
      Other changes:
      1. Added two commands to blockonkeys.c test module (To
         reproduce the case described above)
      2. Simplify blockonkeys.c in order to make testing easier
      3. cast raxSize() to avoid warning with format spec
      c4dc5b80
  22. 31 3月, 2020 4 次提交
  23. 27 3月, 2020 8 次提交