1. 10 Jul, 2020 5 commits
    • Oran Agra's avatar
      skip a test that uses +inf on valgrind (#7440) · 909bc97c
      Oran Agra authored
      On some platforms strtold("+inf") with valgrind returns a non-inf result
      
      [err]: INCRBYFLOAT does not allow NaN or Infinity in tests/unit/type/incr.tcl
      Expected 'ERR*would produce*' to equal or match '1189731495357231765085759.....'
      909bc97c
    • Oran Agra's avatar
      stabilize tests that look for log lines (#7367) · 8e76e134
      Oran Agra authored
      tests were sensitive to additional log lines appearing in the log
      causing the search to come empty handed.
      
      instead of just looking for the n last log lines, capture the log lines
      before performing the action, and then search from that offset.
      8e76e134
    • Oran Agra's avatar
      tests/valgrind: don't use debug restart (#7404) · 69ade873
      Oran Agra authored
      * tests/valgrind: don't use debug restart
      
      DEBUG REATART causes two issues:
      1. it uses execve which replaces the original process and valgrind doesn't
         have a chance to check for errors, so leaks go unreported.
      2. valgrind report invalid calls to close() which we're unable to resolve.
      
      So now the tests use restart_server mechanism in the tests, that terminates
      the old server and starts a new one, new PID, but same stdout, stderr.
      
      since the stderr can contain two or more valgrind report, it is not enough
      to just check for the absence of leaks, we also need to check for some known
      errors, we do both, and fail if we either find an error, or can't find a
      report saying there are no leaks.
      
      other changes:
      - when killing a server that was already terminated we check for leaks too.
      - adding DEBUG LEAK which was used to test it.
      - adding --trace-children to valgrind, although no longer needed.
      - since the stdout contains two or more runs, we need slightly different way
        of checking if the new process is up (explicitly looking for the new PID)
      - move the code that handles --wait-server to happen earlier (before
        watching the startup message in the log), and serve the restarted server too.
      
      * squashme - CR fixes
      69ade873
    • Oran Agra's avatar
      9bbf768d
    • zhaozhao.zz's avatar
      BITOP: propagate only when it really SET or DEL targetkey (#5783) · 1978f996
      zhaozhao.zz authored
      For example:
          BITOP not targetkey sourcekey
      
      If targetkey and sourcekey doesn't exist, BITOP has no effect,
      we do not propagate it, thus can save aof and replica flow.
      1978f996
  2. 25 Jun, 2020 3 commits
  3. 24 Jun, 2020 2 commits
  4. 23 Jun, 2020 3 commits
    • Dave Nielsen's avatar
      updated copyright year · 2d6d9f75
      Dave Nielsen authored
      Changed "2015" to "2020"
      2d6d9f75
    • Salvatore Sanfilippo's avatar
      Merge pull request #7390 from oranagra/exec_fails_abort · 6bbbdd26
      Salvatore Sanfilippo authored
      EXEC always fails with EXECABORT and multi-state is cleared
      6bbbdd26
    • 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
  5. 22 Jun, 2020 5 commits
  6. 18 Jun, 2020 3 commits
  7. 17 Jun, 2020 1 commit
  8. 16 Jun, 2020 4 commits
  9. 15 Jun, 2020 2 commits
  10. 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
  11. 12 Jun, 2020 3 commits
  12. 11 Jun, 2020 3 commits
  13. 10 Jun, 2020 2 commits
  14. 09 Jun, 2020 3 commits