1. 05 3月, 2020 3 次提交
    • G
      Stream: Handle streamID-related edge cases · 89682d96
      Guy Benoish 提交于
      This commit solves several edge cases that are related to
      exhausting the streamID limits: We should correctly calculate
      the succeeding streamID instead of blindly incrementing 'seq'
      This affects both XREAD and XADD.
      
      Other (unrelated) changes:
      Reply with a better error message when trying to add an entry
      to a stream that has exhausted last_id
      89682d96
    • A
      Fix ip and missing mode in RM_GetClusterNodeInfo(). · 920e108f
      antirez 提交于
      920e108f
    • A
      Inline protocol: handle empty strings well. · 7569b210
      antirez 提交于
      This bug is from the first version of Redis. Probably the problem here
      is that before we used an SDS split function that created empty strings
      for additional spaces, like in "SET    foo          bar".
      AFAIK later we replaced it with the curretn sdssplitarg() API that has
      no such a problem. As a result, we introduced a bug, where it is no
      longer possible to do something like:
      
          SET foo ""
      
      Using the inline protocol. Now it is fixed.
      7569b210
  2. 12 2月, 2020 1 次提交
  3. 10 2月, 2020 1 次提交
  4. 08 1月, 2020 1 次提交
  5. 20 11月, 2019 16 次提交
  6. 19 11月, 2019 1 次提交
  7. 15 11月, 2019 9 次提交
  8. 07 11月, 2019 3 次提交
    • A
      Update PR #6537: use a fresh time outside call(). · d3f4dec4
      antirez 提交于
      One problem with the solution proposed so far in #6537 is that key
      lookups outside a command execution via call(), still used a cached
      time. The cached time needed to be refreshed in multiple places,
      especially because of modules callbacks from timers, cluster bus, and
      thread safe contexts, that may use RM_Open().
      
      In order to avoid this problem, this commit introduces the ability to
      detect if we are inside call(): this way we can use the reference fixed
      time only when we are in the context of a command execution or Lua
      script, but for the asynchronous lookups, we can still use mstime() to
      get a fresh time reference.
      d3f4dec4
    • A
      Update PR #6537 patch to for generality. · 33f42665
      antirez 提交于
      After the thread in #6537 and thanks to the suggestions received, this
      commit updates the original patch in order to:
      
      1. Solve the problem of updating the time in multiple places by updating
      it in call().
      2. Avoid introducing a new field but use our cached time.
      
      This required some minor refactoring to the function updating the time,
      and the introduction of a new cached time in microseconds in order to
      use less gettimeofday() calls.
      33f42665
    • Z
      expires: refactoring judgment about whether a key is expired · 68d71d83
      zhaozhao.zz 提交于
      Calling lookupKey*() many times to search a key in one command
      may get different result.
      
      That's because lookupKey*() calls expireIfNeeded(), and delete
      the key when reach the expire time. So we can get an robj before
      the expire time, but a NULL after the expire time.
      
      The worst is that may lead to Redis crash, for example
      `RPOPLPUSH foo foo` the first time we get a list form `foo` and
      hold the pointer, but when we get `foo` again it's expired and
      deleted. Now we hold a freed memory, when execute rpoplpushHandlePush()
      redis crash.
      
      To fix it, we can refactor the judgment about whether a key is expired,
      using the same basetime `server.cmd_start_mstime` instead of calling
      mstime() everytime.
      68d71d83
  9. 01 11月, 2019 1 次提交
    • A
      Modules: fix thread safe context creation crash. · 62588dbf
      antirez 提交于
      See #6525, this likely creates a NULL deference if the client was
      terminated by Redis between the creation of the blocked client and the
      creation of the thread safe context.
      62588dbf
  10. 25 9月, 2019 4 次提交