1. 02 May, 2020 1 commit
    • zhenwei pi's avatar
      Support setcpuaffinity on linux/bsd · 1a0deab2
      zhenwei pi authored
      Currently, there are several types of threads/child processes of a
      redis server. Sometimes we need deeply optimise the performance of
      redis, so we would like to isolate threads/processes.
      
      There were some discussion about cpu affinity cases in the issue:
      https://github.com/antirez/redis/issues/2863
      
      
      
      So implement cpu affinity setting by redis.conf in this patch, then
      we can config server_cpulist/bio_cpulist/aof_rewrite_cpulist/
      bgsave_cpulist by cpu list.
      
      Examples of cpulist in redis.conf:
      server_cpulist 0-7:2      means cpu affinity 0,2,4,6
      bio_cpulist 1,3           means cpu affinity 1,3
      aof_rewrite_cpulist 8-11  means cpu affinity 8,9,10,11
      bgsave_cpulist 1,10-11    means cpu affinity 1,10,11
      
      Test on linux/freebsd, both work fine.
      Signed-off-by: default avatarzhenwei pi <pizhenwei@bytedance.com>
      1a0deab2
  2. 16 Mar, 2020 1 commit
  3. 04 Mar, 2020 1 commit
  4. 27 Feb, 2020 3 commits
  5. 19 Feb, 2020 1 commit
  6. 07 Feb, 2020 1 commit
  7. 06 Feb, 2020 2 commits
  8. 05 Feb, 2020 1 commit
    • Oran Agra's avatar
      config.c verbose error replies for CONFIG SET, like config file parsing · ffdd0620
      Oran Agra authored
      We noticed that the error replies for the generic mechanism for enums
      are very verbose for config file parsing, but not for config set
      command.
      
      instead of replicating this code, i did a small refactoring to share
      code between CONFIG SET and config file parsing.
      
      and also renamed the enum group functions to be consistent with the
      naming of other types.
      ffdd0620
  9. 04 Feb, 2020 1 commit
  10. 14 Jan, 2020 1 commit
  11. 04 Jan, 2020 1 commit
  12. 31 Dec, 2019 1 commit
    • WuYunlong's avatar
      Fix petential cluster link error. · 0992ada2
      WuYunlong authored
      Funcion adjustOpenFilesLimit() has an implicit parameter, which is server.maxclients.
      This function aims to ajust maximum file descriptor number according to server.maxclients
      by best effort, which is "bestlimit" could be lower than "maxfiles" but greater than "oldlimit".
      When we try to increase "maxclients" using CONFIG SET command, we could increase maximum
      file descriptor number to a bigger value without calling aeResizeSetSize the same time.
      When later more and more clients connect to server, the allocated fd could be bigger and bigger,
      and eventually exceeds events size of aeEventLoop.events. When new nodes joins the cluster,
      new link is created, together with new fd, but when calling aeCreateFileEvent, we did not
      check the return value. In this case, we have a non-null "link" but the associated fd is not
      registered.
      
      So when we dynamically set "maxclients" we could reach an inconsistency between maximum file
      descriptor number of the process and server.maxclients. And later could cause cluster link and link
      fd inconsistency.
      
      While setting "maxclients" dynamically, we consider it as failed when resulting "maxclients" is not
      the same as expected. We try to restore back the maximum file descriptor number when we failed to set
      "maxclients" to the specified value, so that server.maxclients could act as a guard as before.
      0992ada2
  13. 26 Dec, 2019 1 commit
    • Oran Agra's avatar
      config.c adjust config limits and mutable · 0c3fe52e
      Oran Agra authored
      - make lua-replicate-commands mutable (it never was, but i don't see why)
      - make tcp-backlog immutable (fix a recent refactory mistake)
      - increase the max limit of a few configs to match what they were before
      the recent refactory
      0c3fe52e
  14. 18 Dec, 2019 1 commit
  15. 17 Dec, 2019 2 commits
  16. 01 Dec, 2019 1 commit
  17. 28 Nov, 2019 2 commits
    • Oran Agra's avatar
      Converting more configs to use generic infra, and moving defaults to config.c · 18e72c5c
      Oran Agra authored
      Changes in behavior:
      - Change server.stream_node_max_entries from int64_t to long long, so that it can be used by the generic infra
      - standard error reply instead of "repl-backlog-size must be 1 or greater" and such
      - tls-port and a few TLS booleans were readable (config get) even when USE_OPENSSL was off (now they aren't)
      - syslog-enabled, syslog-ident, cluster-enabled, appendfilename, and supervised didn't have a get (now they do)
      - pidfile was initialized to NULL in InitServerConfig but had CONFIG_DEFAULT_PID_FILE in rewriteConfig (so the real default was "", but rewrite would cause it to be set), fixed the rewrite.
      - TLS config in server.h was uninitialized (if no tls config args were provided)
      
      Adding test for sanity and coverage
      18e72c5c
    • Oran Agra's avatar
      More improvements and fixes to generic config infra · 28beb05a
      Oran Agra authored
      - Adding is_valid_fn and update_fn, both return 1 for success and 0 for failure with an optional error message.
      - Bugfix in handling boundary check of unsigned numeric types (was boundaries as signed)
      - Adding more numeric types to generic mechanism: uint, ulonglong, long, time_t, off_t
      - More verbose error replies ("argument must be between" in out of range CONFIG SET (like config file parsing)
      28beb05a
  18. 26 Nov, 2019 1 commit
    • Oran Agra's avatar
      Additional config.c refactory and bugfixes · e0cc3c99
      Oran Agra authored
      - add capability for each config to have a callback to check if value is valid and return error string
        will enable converting many of the remaining custom configs into generic ones (reducing the x4 repetition for set,get,config,rewrite)
      - add capability for each config to  to run some update code after config is changed (only for CONFIG SET)
        will also enable converting many of the remaining custom configs into generic ones
      - add capability to move default values from server.h and server.c to config.c
        will reduce many excess lines in server.h and server.c (plus, no need to rebuild the entire code base when a default change 8-))
      
      other behavior changes:
      - fix bug in bool config get (always returning 'yes')
      - fix a bug in modifying jemalloc-bg-thread at runtime (didn't call set_jemalloc_bg_thread, due to bad merge conflict resolution (my fault))
      - side effect when a failed attempt to enable activedefrag at runtime, we now respond with -ERR and not with -DISABLED
      e0cc3c99
  19. 22 Nov, 2019 5 commits
  20. 20 Nov, 2019 1 commit
  21. 18 Nov, 2019 1 commit
  22. 08 Oct, 2019 1 commit
    • Yossi Gottlieb's avatar
      TLS: Improve CA certifiate configuration options. · d7f2681a
      Yossi Gottlieb authored
      This adds support for explicit configuration of a CA certs directory (in
      addition to the previously supported bundle file).  For redis-cli, if no
      explicit CA configuration is supplied the system-wide default
      configuration will be adopted.
      d7f2681a
  23. 07 Oct, 2019 3 commits
    • Yossi Gottlieb's avatar
      TLS: Configuration options. · 61733ded
      Yossi Gottlieb authored
      Add configuration options for TLS protocol versions, ciphers/cipher
      suites selection, etc.
      61733ded
    • Oran Agra's avatar
      diskless replication rdb transfer uses pipe, and writes to sockets form the parent process. · 5a477946
      Oran Agra authored
      misc:
      - handle SSL_has_pending by iterating though these in beforeSleep, and setting timeout of 0 to aeProcessEvents
      - fix issue with epoll signaling EPOLLHUP and EPOLLERR only to the write handlers. (needed to detect the rdb pipe was closed)
      - add key-load-delay config for testing
      - trim connShutdown which is no longer needed
      - rioFdsetWrite -> rioFdWrite - simplified since there's no longer need to write to multiple FDs
      - don't detect rdb child exited (don't call wait3) until we detect the pipe is closed
      - Cleanup bad optimization from rio.c, add another one
      5a477946
    • Yossi Gottlieb's avatar
      TLS: Connections refactoring and TLS support. · b087dd1d
      Yossi Gottlieb authored
      * Introduce a connection abstraction layer for all socket operations and
      integrate it across the code base.
      * Provide an optional TLS connections implementation based on OpenSSL.
      * Pull a newer version of hiredis with TLS support.
      * Tests, redis-cli updates for TLS support.
      b087dd1d
  24. 20 Sep, 2019 3 commits
  25. 08 Aug, 2019 1 commit
  26. 24 Jul, 2019 1 commit
  27. 23 Jul, 2019 1 commit