1. 11 Jul, 2021 3 commits
    • Huang Zhw's avatar
      Do not install a file event to send data to rewrite child when parent stop... · cb961d8c
      Huang Zhw authored
      Do not install a file event to send data to rewrite child when parent stop sending diff to child in aof rewrite. (#8767)
      
      In aof rewrite, when parent stop sending data to child, if there is
      new rewrite data, aofChildWriteDiffData write event will be installed.
      Then this event is issued and deletes the file event without do anyting.
      This will happen over and over again until aof rewrite finish.
      
      This bug used to waste a few system calls per excessive wake-up
      (epoll_ctl and epoll_wait) per cycle, each cycle triggered by receiving
      a write command from a client.
      cb961d8c
    • Binbin's avatar
      Add test for ziplist (nextdiff == -4 && reqlen < 4) (#9218) · fe5d3251
      Binbin authored
      The if judgement `nextdiff == -4 && reqlen < 4` in __ziplistInsert.
      It's strange, but it's useful. Without it there will be problems during
      chain update.
      Till now these lines didn't have coverage in the tests, and there was
      a question if they are at all needed (#7170)
      fe5d3251
    • Yossi Gottlieb's avatar
      Pre-test bind-source-addr before running test. (#9214) · 92e80047
      Yossi Gottlieb authored
      This attempts to catch any non-standard configuration where the test may
      fail and produce a false positive.
      92e80047
  2. 10 Jul, 2021 1 commit
  3. 09 Jul, 2021 1 commit
  4. 07 Jul, 2021 1 commit
    • Mikhail Fesenko's avatar
      Direct redis-cli repl prints to stderr, because --rdb can print to stdout.... · 1eb4baa5
      Mikhail Fesenko authored
      
      Direct redis-cli repl prints to stderr, because --rdb can print to stdout. fflush stdout after responses  (#9136)
      
      1. redis-cli can output --rdb data to stdout
         but redis-cli also write some messages to stdout which will mess up the rdb.
      
      2. Make redis-cli flush stdout when printing a reply
        This was needed in order to fix a hung in redis-cli test that uses
        --replica.
         Note that printf does flush when there's a newline, but fwrite does not.
      
      3. fix the redis-cli --replica test which used to pass previously
         because it didn't really care what it read, and because redis-cli
         used printf to print these other things to stdout.
      
      4. improve redis-cli --replica test to run with both diskless and disk-based.
      Co-authored-by: default avatarOran Agra <oran@redislabs.com>
      Co-authored-by: default avatarViktor Söderqvist <viktor@zuiderkwast.se>
      1eb4baa5
  5. 06 Jul, 2021 3 commits
  6. 05 Jul, 2021 7 commits
  7. 04 Jul, 2021 2 commits
  8. 03 Jul, 2021 1 commit
  9. 01 Jul, 2021 3 commits
    • Yossi Gottlieb's avatar
      Fix CLIENT UNBLOCK crashing modules. (#9167) · aa139e2f
      Yossi Gottlieb authored
      Modules that use background threads with thread safe contexts are likely
      to use RM_BlockClient() without a timeout function, because they do not
      set up a timeout.
      
      Before this commit, `CLIENT UNBLOCK` would result with a crash as the
      `NULL` timeout callback is called. Beyond just crashing, this is also
      logically wrong as it may throw the module into an unexpected client
      state.
      
      This commits makes `CLIENT UNBLOCK` on such clients behave the same as
      any other client that is not in a blocked state and therefore cannot be
      unblocked.
      aa139e2f
    • Oran Agra's avatar
      Fix bug in sdscatfmt when % is the last format char (#9173) · de9bae21
      Oran Agra authored
      
      
      For the sdscatfmt function in sds.c, when the parameter fmt ended up with '%',
      the behavior is undefined. This commit fix this bug.
      Co-authored-by: default avatarstafuc <stafuc@gmail.com>
      de9bae21
    • Wang Yuan's avatar
      Don't start in sentinel mode if only the folder name contains redis-sentinel (#9176) · 16e04ed9
      Wang Yuan authored
      Before this commit, redis-server starts in sentinel mode if the first startup
      argument has the string redis-sentinel, so redis also starts in sentinel mode
      if the directory it was started from contains the string redis-sentinel.
      Now we check the executable name instead of directory.
      
      Some examples:
      1. Execute ./redis-sentinel/redis/src/redis-sentinel, starts in sentinel mode.
      2. Execute ./redis-sentinel/redis/src/redis-server, starts in server mode,
         but before, redis will start in sentinel mode.
      3. Execute ./redis-sentinel/redis/src/redis-server --sentinel, of course, like
         before, starts in sentinel mode.
      16e04ed9
  10. 30 Jun, 2021 8 commits
  11. 29 Jun, 2021 5 commits
  12. 28 Jun, 2021 1 commit
    • Wang Yuan's avatar
      Remove unnecessary replication backlog memory copy (#9157) · 4fa3e230
      Wang Yuan authored
      in the past, the reply list was a list of sds objects, so this didn't have any overhead,
      but now addReplySds just copies the data from the sds and frees it, so there's no
      need to make a copy of the buffer before copying again.
      this reduces an excessive allocation and free and a memcpy.
      4fa3e230
  13. 27 Jun, 2021 1 commit
  14. 26 Jun, 2021 1 commit
  15. 24 Jun, 2021 2 commits
    • Yossi Gottlieb's avatar
      Add bind-source-addr configuration argument. (#9142) · f233c4c5
      Yossi Gottlieb authored
      In the past, the first bind address that was explicitly specified was
      also used to bind outgoing connections. This could result with some
      problems. For example: on some systems using `bind 127.0.0.1` would
      result with outgoing connections also binding to `127.0.0.1` and failing
      to connect to remote addresses.
      
      With the recent change to the way `bind` is handled, this presented
      other issues:
      
      * The default first bind address is '*' which is not a valid address.
      * We make no distinction between user-supplied config that is identical
      to the default, and the default config.
      
      This commit addresses both these issues by introducing an explicit
      configuration parameter to control the bind address on outgoing
      connections.
      f233c4c5
    • Huang Zhw's avatar
      Clean redis-benchmark Throughput output. (#9139) · d1a21e02
      Huang Zhw authored
      some leftovers from print are visible when the new line is printed.
      d1a21e02