1. 22 Sep, 2020 5 commits
  2. 21 Sep, 2020 5 commits
  3. 20 Sep, 2020 3 commits
  4. 19 Sep, 2020 1 commit
  5. 17 Sep, 2020 2 commits
    • Wang Yuan's avatar
      Remove tmp rdb file in background thread (#7762) · b002d2b4
      Wang Yuan authored
      We're already using bg_unlink in several places to delete the rdb file in the background,
      and avoid paying the cost of the deletion from our main thread.
      This commit uses bg_unlink to remove the temporary rdb file in the background too.
      
      However, in case we delete that rdb file just before exiting, we don't actually wait for the
      background thread or the main thread to delete it, and just let the OS clean up after us.
      i.e. we open the file, unlink it and exit with the fd still open.
      
      Furthermore, rdbRemoveTempFile can be called from a thread and was using snprintf which is
      not async-signal-safe, we now use ll2string instead.
      b002d2b4
    • Wang Yuan's avatar
      Implement redisAtomic to replace _Atomic C11 builtin (#7707) · 445a4b66
      Wang Yuan authored
      Redis 6.0 introduces I/O threads, it is so cool and efficient, we use C11
      _Atomic to establish inter-thread synchronization without mutex. But the
      compiler that must supports C11 _Atomic can compile redis code, that brings a
      lot of inconvenience since some common platforms can't support by default such
      as CentOS7, so we want to implement redis atomic type to make it more portable.
      
      We have implemented our atomic variable for redis that only has 'relaxed'
      operations in src/atomicvar.h, so we implement some operations with
      'sequentially-consistent', just like the default behavior of C11 _Atomic that
      can establish inter-thread synchronization. And we replace all uses of C11
      _Atomic with redis atomic variable.
      
      Our implementation of redis atomic variable uses C11 _Atomic, __atomic or
      __sync macros if available, it supports most common platforms, and we will
      detect automatically which feature we use. In Makefile we use a dummy file to
      detect if the compiler supports C11 _Atomic. Now for gcc, we can compile redis
      code theoretically if your gcc version is not less than 4.1.2(starts to support
      __sync_xxx operations). Otherwise, we remove use mutex fallback to implement
      redis atomic variable for performance and test. You will get compiling errors
      if your compiler doesn't support all features of above.
      
      For cover redis atomic variable tests, we add other CI jobs that build redis on
      CentOS6 and CentOS7 and workflow daily jobs that run the tests on them.
      For them, we just install gcc by default in order to cover different compiler
      versions, gcc is 4.4.7 by default installation on CentOS6 and 4.8.5 on CentOS7.
      
      We restore the feature that we can test redis with Helgrind to find data race
      errors. But you need install Valgrind in the default path configuration firstly
      before running your tests, since we use macros in helgrind.h to tell Helgrind
      inter-thread happens-before relationship explicitly for avoiding false positives.
      Please open an issue on github if you find data race errors relate to this commit.
      
      Unrelated:
      - Fix redefinition of typedef 'RedisModuleUserChangedFunc'
        For some old version compilers, they will report errors or warnings, if we
        re-define function type.
      445a4b66
  6. 16 Sep, 2020 4 commits
    • Oran Agra's avatar
      Add printf attribute and fix warnings and a minor bug (#7803) · 092cfca5
      Oran Agra authored
      The fix in error handling of rdbGenericLoadStringObject is an actual bugfix
      092cfca5
    • WuYunlong's avatar
      f8660233
    • WuYunlong's avatar
      bio: fix doFastMemoryTest. · 8b70cb0e
      WuYunlong authored
      If one thread got SIGSEGV, function sigsegvHandler() would be triggered,
      it would call bioKillThreads(). But call pthread_cancel() to cancel itself
      would make it block. Also note that if SIGSEGV is caught by bio thread, it
      should kill the main thread in order to give a positive report.
      8b70cb0e
    • Jim Brunner's avatar
      Incremental eviction processing (#7653) · 810e28a3
      Jim Brunner authored
      Rather than blindly evicting until maxmemory limit is achieved, this
      update adds a time limit to eviction.  While over the maxmemory limit,
      eviction will process before each command AND as a timeProc when no
      commands are running.
      
      This will reduce the latency impact on many cases, especially pathological
      cases like massive used memory increase during dict rehashing.
      
      There is a risk that some other edge cases (like massive pipelined use
      of MGET) could cause Redis memory usage to keep growing despite the
      eviction attempts, so a new maxmemory-eviction-tenacity config is
      introduced to let users mitigate that.
      810e28a3
  7. 15 Sep, 2020 2 commits
  8. 13 Sep, 2020 3 commits
    • Mykhailo Pylyp's avatar
    • Oran Agra's avatar
      Fix failing valgrind installation in github actions (#7792) · 78a6e5eb
      Oran Agra authored
      These tests started failing every day on http 404 (not being able to
      install valgrind)
      78a6e5eb
    • Oran Agra's avatar
      fix broken PEXPIREAT test (#7791) · ed9bfe22
      Oran Agra authored
      This test was nearly always failing on MacOS github actions.
      This is because of bugs in the test that caused it to nearly always run
      all 3 attempts and just look at the last one as the pass/fail creteria.
      
      i.e. the test was nearly always running all 3 attempts and still sometimes
      succeed. this is because the break condition was different than the test
      completion condition.
      
      The reason the test succeeded is because the break condition tested the
      results of all 3 tests (PSETEX/PEXPIRE/PEXPIREAT), but the success check
      at the end was only testing the result of PSETEX.
      
      The reason the PEXPIREAT test nearly always failed is because it was
      getting the current time wrong: getting the current second and loosing
      the sub-section time, so the only chance for it to succeed is if it run
      right when a certain second started.
      
      Because i now get the time from redis, adding another round trip, i
      added another 100ms to the PEXPIRE test to make it less fragile, and
      also added many more attempts.
      
      Adding many more attempts before failure to account for slow platforms,
      github actions and valgrind
      ed9bfe22
  9. 10 Sep, 2020 4 commits
    • Wang Yuan's avatar
      86511bbb
    • Oran Agra's avatar
      Squash merging 125 typo/grammar/comment/doc PRs (#7773) · 1c710385
      Oran Agra authored
      List of squashed commits or PRs
      ===============================
      
      commit 66801ea
      Author: hwware <wen.hui.ware@gmail.com>
      Date:   Mon Jan 13 00:54:31 2020 -0500
      
          typo fix in acl.c
      
      commit 46f55db
      Author: Itamar Haber <itamar@redislabs.com>
      Date:   Sun Sep 6 18:24:11 2020 +0300
      
          Updates a couple of comments
      
          Specifically:
      
          * RM_AutoMemory completed instead of pointing to docs
          * Updated link to custom type doc
      
      commit 61a2aa0
      Author: xindoo <xindoo@qq.com>
      Date:   Tue Sep 1 19:24:59 2020 +0800
      
          Correct errors in code comments
      
      commit a5871d1
      Author: yz1509 <pro-756@qq.com>
      Date:   Tue Sep 1 18:36:06 2020 +0800
      
          fix typos in module.c
      
      commit 41eede7
      Author: bookug <bookug@qq.com>
      Date:   Sat Aug 15 01:11:33 2020 +0800
      
          docs: fix typos in comments
      
      commit c303c84
      Author: lazy-snail <ws.niu@outlook.com>
      Date:   Fri Aug 7 11:15:44 2020 +0800
      
          fix spelling in redis.conf
      
      commit 1e...
      1c710385
    • Oran Agra's avatar
      8ea131fc
    • Oran Agra's avatar
  10. 09 Sep, 2020 11 commits