1. 25 Jun, 2020 1 commit
  2. 24 Jun, 2020 1 commit
  3. 23 Jun, 2020 1 commit
    • Oran Agra's avatar
      EXEC always fails with EXECABORT and multi-state is cleared · 65a3307b
      Oran Agra authored
      In order to support the use of multi-exec in pipeline, it is important that
      MULTI and EXEC are never rejected and it is easy for the client to know if the
      connection is still in multi state.
      
      It was easy to make sure MULTI and DISCARD never fail (done by previous
      commits) since these only change the client state and don't do any actual
      change in the server, but EXEC is a different story.
      
      Since in the past, it was possible for clients to handle some EXEC errors and
      retry the EXEC, we now can't affort to return any error on EXEC other than
      EXECABORT, which now carries with it the real reason for the abort too.
      
      Other fixes in this commit:
      - Some checks that where performed at the time of queuing need to be re-
        validated when EXEC runs, for instance if the transaction contains writes
        commands, it needs to be aborted. there was one check that was already done
        in execCommand (-READONLY), but other checks where missing: -OOM, -MISCONF,
        -NOREPLICAS, -MASTERDOWN
      - When a command is rejected by processCommand it was rejected with addReply,
        which was not recognized as an error in case the bad command came from the
        master. this will enable to count or MONITOR these errors in the future.
      - make it easier for tests to create additional (non deferred) clients.
      - add tests for the fixes of this commit.
      65a3307b
  4. 22 Jun, 2020 4 commits
  5. 18 Jun, 2020 1 commit
  6. 17 Jun, 2020 1 commit
  7. 16 Jun, 2020 3 commits
  8. 15 Jun, 2020 1 commit
  9. 14 Jun, 2020 1 commit
    • meir@redislabs.com's avatar
      Fix RM_ScanKey module api not to return int encoded strings · a89bf734
      meir@redislabs.com authored
      The scan key module API provides the scan callback with the current
      field name and value (if it exists). Those arguments are RedisModuleString*
      which means it supposes to point to robj which is encoded as a string.
      Using createStringObjectFromLongLong function might return robj that
      points to an integer and so break a module that tries for example to
      use RedisModule_StringPtrLen on the given field/value.
      
      The PR introduces a fix that uses the createObject function and sdsfromlonglong function.
      Using those function promise that the field and value pass to the to the
      scan callback will be Strings.
      
      The PR also changes the Scan test module to use RedisModule_StringPtrLen
      to catch the issue. without this, the issue is hidden because
      RedisModule_ReplyWithString knows to handle integer encoding of the
      given robj (RedisModuleString).
      
      The PR also introduces a new test to verify the issue is solved.
      a89bf734
  10. 12 Jun, 2020 2 commits
  11. 11 Jun, 2020 3 commits
  12. 10 Jun, 2020 2 commits
  13. 09 Jun, 2020 2 commits
  14. 08 Jun, 2020 3 commits
    • Oran Agra's avatar
      fix disconnectSlaves, to try to free each slave. · 12504105
      Oran Agra authored
      the recent change in that loop (iteration rather than waiting for it to
      be empty) was intended to avoid an endless loop in case some slave would
      refuse to be freed.
      
      but the lookup of the first client remained, which would have caused it
      to try the first one again and again instead of moving on.
      12504105
    • Oran Agra's avatar
      2bb297b1
    • Oran Agra's avatar
      Avoid rejecting WATCH / UNWATCH, like MULTI/EXEC/DISCARD · 2fa077b0
      Oran Agra authored
      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
  15. 07 Jun, 2020 1 commit
  16. 06 Jun, 2020 2 commits
  17. 03 Jun, 2020 1 commit
  18. 02 Jun, 2020 1 commit
  19. 29 May, 2020 1 commit
    • antirez's avatar
      Fix handling of special chars in ACL LOAD. · 1f8ea99b
      antirez authored
      Now it is also possible for ACL SETUSER to accept empty strings
      as valid operations (doing nothing), so for instance
      
          ACL SETUSER myuser ""
      
      Will have just the effect of creating a user in the default state.
      
      This should fix #7329.
      1f8ea99b
  20. 28 May, 2020 1 commit
  21. 27 May, 2020 5 commits
    • antirez's avatar
      Drop useless line from replicationCacheMaster(). · 484af8ed
      antirez authored
      484af8ed
    • Kevin Fwu's avatar
      Fix TLS certificate loading for chained certificates. · 151b12a8
      Kevin Fwu authored
      This impacts client verification for chained certificates (such as Lets
      Encrypt certificates). Client Verify requires the full chain in order to
      properly verify the certificate.
      151b12a8
    • antirez's avatar
      Remove the meaningful offset feature. · 22472fe5
      antirez authored
      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
    • antirez's avatar
      Set a protocol error if master use the inline protocol. · 325409a0
      antirez authored
      We want to react a bit more aggressively if we sense that the master is
      sending us some corrupted stream. By setting the protocol error we both
      ensure that the replica will disconnect, and avoid caching the master so
      that a full SYNC will be required. This is protective against
      replication bugs.
      325409a0
    • Liu Zhen's avatar
      fix clusters mixing accidentally by gossip · 3984dc65
      Liu Zhen authored
      `clusterStartHandshake` will start hand handshake
      and eventually send CLUSTER MEET message, which is strictly prohibited
      in the REDIS CLUSTER SPEC.
      Only system administrator can initiate CLUSTER MEET message.
      Futher, according to the SPEC, rather than IP/PORT pairs, only nodeid
      can be trusted.
      3984dc65
  22. 26 May, 2020 2 commits