1. 16 6月, 2020 1 次提交
  2. 09 5月, 2020 1 次提交
    • A
      Cluster: introduce data_received field. · 00a3bc43
      antirez 提交于
      We want to send pings and pongs at specific intervals, since our packets
      also contain information about the configuration of the cluster and are
      used for gossip. However since our cluster bus is used in a mixed way
      for data (such as Pub/Sub or modules cluster messages) and metadata,
      sometimes a very busy channel may delay the reception of pong packets.
      So after discussing it in #7216, this commit introduces a new field that
      is not exposed in the cluster, is only an internal information about
      the last time we received any data from a given node: we use this field
      in order to avoid detecting failures, claiming data reception of new
      data from the node is a proof of liveness.
      00a3bc43
  3. 17 12月, 2019 1 次提交
  4. 28 11月, 2019 1 次提交
    • O
      Converting more configs to use generic infra, and moving defaults to config.c · 18e72c5c
      Oran Agra 提交于
      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
  5. 08 10月, 2019 1 次提交
    • Y
      TLS: Connections refactoring and TLS support. · b087dd1d
      Yossi Gottlieb 提交于
      * 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
  6. 19 9月, 2018 2 次提交
  7. 04 7月, 2018 1 次提交
  8. 29 3月, 2018 1 次提交
  9. 14 3月, 2018 1 次提交
    • A
      Cluster: ability to prevent slaves from failing over their masters. · 432bf477
      antirez 提交于
      This commit, in some parts derived from PR #3041 which is no longer
      possible to merge (because the user deleted the original branch),
      implements the ability of slaves to have a special configuration
      preventing that they try to start a failover when the master is failing.
      
      There are multiple reasons for wanting this, and the feautre was
      requested in issue #3021 time ago.
      
      The differences between this patch and the original PR are the
      following:
      
      1. The flag is saved/loaded on the nodes configuration.
      2. The 'myself' node is now flag-aware, the flag is updated as needed
         when the configuration is changed via CONFIG SET.
      3. The flag name uses NOFAILOVER instead of NO_FAILOVER to be consistent
         with existing NOADDR.
      4. The redis.conf documentation was rewritten.
      
      Thanks to @deep011 for the original patch.
      432bf477
  10. 04 6月, 2017 1 次提交
  11. 14 4月, 2017 2 次提交
    • A
      Cluster: always add PFAIL nodes at end of gossip section. · 02777bb2
      antirez 提交于
      To rely on the fact that nodes in PFAIL state will be shared around by
      randomly adding them in the gossip section is a weak assumption,
      especially after changes related to sending less ping/pong packets.
      
      We want to always include gossip entries for all the nodes that are in
      PFAIL state, so that the PFAIL -> FAIL state promotion can happen much
      faster and reliably.
      
      Related to #3929.
      02777bb2
    • A
      Cluster: collect more specific bus messages stats. · c5d6f577
      antirez 提交于
      First step in order to change Cluster in order to use less messages.
      Related to issue #3929.
      c5d6f577
  12. 27 3月, 2017 1 次提交
  13. 29 1月, 2016 2 次提交
  14. 14 1月, 2016 1 次提交
  15. 11 12月, 2015 1 次提交
    • A
      Cluster: replica migration with delay. · adc2fe69
      antirez 提交于
      We wait a fixed amount of time (5 seconds currently) much greater than
      the usual Cluster node to node communication latency, before migrating.
      This way when a failover occurs, before detecting the new master as a
      target for migration, we give the time to its natural slaves (the slaves
      of the failed over master) to announce they switched to the new master,
      preventing an useless migration operation.
      adc2fe69
  16. 10 12月, 2015 1 次提交
    • A
      Fix replicas migration by adding a new flag. · e0f22df9
      antirez 提交于
      Some time ago I broken replicas migration (reported in #2924).
      The idea was to prevent masters without replicas from getting replicas
      because of replica migration, I remember it to create issues with tests,
      but there is no clue in the commit message about why it was so
      undesirable.
      
      However my patch as a side effect totally ruined the concept of replicas
      migration since we want it to work also for instances that, technically,
      never had slaves in the past: promoted slaves.
      
      So now instead the ability to be targeted by replicas migration, is a
      new flag "migrate-to". It only applies to masters, and is set in the
      following two cases:
      
      1. When a master gets a slave, it is set.
      2. When a slave turns into a master because of fail over, it is set.
      
      This way replicas migration targets are only masters that used to have
      slaves, and slaves of masters (that used to have slaves... obviously)
      and are promoted.
      
      The new flag is only internal, and is never exposed in the output nor
      persisted in the nodes configuration, since all the information to
      handle it are implicit in the cluster configuration we already have.
      e0f22df9
  17. 27 7月, 2015 2 次提交
  18. 26 7月, 2015 1 次提交
  19. 24 3月, 2015 1 次提交
    • A
      Cluster: redirection refactoring + handling of blocked clients. · 9b7f8b1c
      antirez 提交于
      There was a bug in Redis Cluster caused by clients blocked in a blocking
      list pop operation, for keys no longer handled by the instance, or
      in a condition where the cluster became down after the client blocked.
      
      A typical situation is:
      
      1) BLPOP <somekey> 0
      2) <somekey> hash slot is resharded to another master.
      
      The client will block forever int this case.
      
      A symmentrical non-cluster-specific bug happens when an instance is
      turned from master to slave. In that case it is more serious since this
      will desynchronize data between slaves and masters. This other bug was
      discovered as a side effect of thinking about the bug explained and
      fixed in this commit, but will be fixed in a separated commit.
      9b7f8b1c
  20. 20 3月, 2015 1 次提交
    • A
      Cluster: better cluster state transiction handling. · 25c0f5ac
      antirez 提交于
      Before we relied on the global cluster state to make sure all the hash
      slots are linked to some node, when getNodeByQuery() is called. So
      finding the hash slot unbound was checked with an assertion. However
      this is fragile. The cluster state is often updated in the
      clusterBeforeSleep() function, and not ASAP on state change, so it may
      happen to process clients with a cluster state that is 'ok' but yet
      certain hash slots set to NULL.
      
      With this commit the condition is also checked in getNodeByQuery() and
      reported with a identical error code of -CLUSTERDOWN but slightly
      different error message so that we have more debugging clue in the
      future.
      
      Root cause of issue #2288.
      25c0f5ac
  21. 13 1月, 2015 1 次提交
    • A
      Cluster: clusterMsgDataGossip structure, explict padding + minor stuff. · 5b0f4a83
      antirez 提交于
      Also explicitly set version to 0, add a protocol version define, improve
      comments in the gossip structure.
      
      Note that the structure layout is the same after the change, we are just
      making the padding explicit with an additional not used 16 bits field.
      So this commit is still able to talk with the previous versions of
      cluster nodes.
      5b0f4a83
  22. 28 11月, 2014 1 次提交
    • A
      Cluster PUBLISH message: fix totlen count. · 669aa2a2
      antirez 提交于
      bulk_data field size was not removed from the count. It is not possible
      to declare it simply as 'char bulk_data[]' since the structure is nested
      into another structure.
      669aa2a2
  23. 07 10月, 2014 1 次提交
  24. 29 9月, 2014 1 次提交
    • M
      Clean up text throughout project · 12d0195b
      Matt Stancliff 提交于
        - Remove trailing newlines from redis.conf
        - Fix comment misspelling
        - Clarifies zipEncodeLength usage and a C API mention (#1243, #1242)
        - Fix cluster typos (inspired by @papanikge #1507)
        - Fix rewite -> rewrite in a few places (inspired by #682)
      
      Closes #1243, #1242, #1507
      12d0195b
  25. 17 9月, 2014 1 次提交
  26. 25 8月, 2014 1 次提交
  27. 22 5月, 2014 1 次提交
  28. 27 3月, 2014 1 次提交
  29. 10 3月, 2014 1 次提交
    • A
      Cluster: better timeout and retry time for failover. · 0f1f2578
      antirez 提交于
      When node-timeout is too small, in the order of a few milliseconds,
      there is no way the voting process can terminate during that time, so we
      set a lower limit for the failover timeout of two seconds.
      
      The retry time is set to two times the failover timeout time, so it is
      at least 4 seconds.
      0f1f2578
  30. 07 3月, 2014 2 次提交
  31. 26 2月, 2014 1 次提交
  32. 10 2月, 2014 3 次提交
  33. 05 2月, 2014 1 次提交
    • A
      Cluster: force AUTH ACK on manual failover. · b7402bca
      antirez 提交于
      When a slave requests masters vote for a manual failover, the
      REQUEST_AUTH message is flagged in a special way in order to force the
      masters to give the authorization even if the master is not marked as
      failing.
      b7402bca