1. 07 Aug, 2015 1 commit
  2. 06 Aug, 2015 3 commits
    • antirez's avatar
      Fixed issues introduced during last merge. · c9df63c1
      antirez authored
      c9df63c1
    • antirez's avatar
      ce3a2d08
    • antirez's avatar
      Replication: add REPLCONF CAPA EOF support. · 6974e69f
      antirez authored
      Add the concept of slaves capabilities to Redis, the slave now presents
      to the Redis master with a set of capabilities in the form:
      
          REPLCONF capa SOMECAPA capa OTHERCAPA ...
      
      This has the effect of setting slave->slave_capa with the corresponding
      SLAVE_CAPA macros that the master can test later to understand if it
      the slave will understand certain formats and protocols of the
      replication process. This makes it much simpler to introduce new
      replication capabilities in the future in a way that don't break old
      slaves or masters.
      
      This patch was designed and implemented together with Oran Agra
      (@oranagra).
      6974e69f
  3. 05 Aug, 2015 11 commits
    • antirez's avatar
      Fix synchronous readline "\n" handling. · be56e4cf
      antirez authored
      Our function to read a line with a timeout handles newlines as requests
      to refresh the timeout, however the code kept subtracting the buffer
      size left every time a newline was received, for a bug in the loop
      logic. Fixed by this commit.
      be56e4cf
    • antirez's avatar
      Fix replication slave pings period. · a67d67b5
      antirez authored
      For PINGs we use the period configured by the user, but for the newlines
      of slaves waiting for an RDB to be created (including slaves waiting for
      the FULLRESYNC reply) we need to ping with frequency of 1 second, since
      the timeout is fixed and needs to be refreshed.
      a67d67b5
    • antirez's avatar
      Fix RDB encoding test for new csvdump format. · 9a5560f4
      antirez authored
      9a5560f4
    • antirez's avatar
    • antirez's avatar
      Make sure we re-emit SELECT after each new slave full sync setup. · 39994c24
      antirez authored
      In previous commits we moved the FULLRESYNC to the moment we start the
      BGSAVE, so that the offset we provide is the right one. However this
      also means that we need to re-emit the SELECT statement every time a new
      slave starts to accumulate the changes.
      
      To obtian this effect in a more clean way, the function that sends the
      FULLRESYNC reply was overloaded with a more important role of also doing
      this and chanigng the slave state. So it was renamed to
      replicationSetupSlaveForFullResync() to better reflect what it does now.
      39994c24
    • antirez's avatar
      Test: csvdump now scans all DBs. · a89326f0
      antirez authored
      a89326f0
    • antirez's avatar
      b2ff48ef
    • antirez's avatar
      PSYNC test: also test the vanilla SYNC. · 7967f1bc
      antirez authored
      7967f1bc
    • antirez's avatar
      syncCommand() comments improved. · e684e726
      antirez authored
      e684e726
    • antirez's avatar
      PSYNC initial offset fix. · 4b010572
      antirez authored
      This commit attempts to fix a bug involving PSYNC and diskless
      replication (currently experimental) found by Yuval Inbar from Redis Labs
      and that was later found to have even more far reaching effects (the bug also
      exists when diskstore is off).
      
      The gist of the bug is that, a Redis master replies with +FULLRESYNC to
      a PSYNC attempt that fails and requires a full resynchronization.
      However, the baseline offset sent along with FULLRESYNC was always the
      current master replication offset. This is not ok, because there are
      many reasosn that may delay the RDB file creation. And... guess what,
      the master offset we communicate must be the one of the time the RDB
      was created. So for example:
      
      1) When the BGSAVE for replication is delayed since there is one
         already but is not good for replication.
      2) When the BGSAVE is not needed as we attach one currently ongoing.
      3) When because of diskless replication the BGSAVE is delayed.
      
      In all the above cases the PSYNC reply is wrong and the slave may
      reconnect later claiming to need a wrong offset: this may cause
      data curruption later.
      4b010572
    • antirez's avatar
      Test PSYNC with diskless replication. · dc4d2444
      antirez authored
      Thanks to Oran Agra from Redis Labs for providing this patch.
      dc4d2444
  4. 17 Jul, 2015 2 commits
  5. 16 Jul, 2015 1 commit
  6. 13 Jul, 2015 1 commit
  7. 04 Jun, 2015 2 commits
  8. 03 Jun, 2015 3 commits
  9. 25 May, 2015 1 commit
    • therealbill's avatar
      adding a sentinel command: "flushconfig" · 22ee2f9c
      therealbill authored
      This new command triggers a config flush to save the in-memory config to
      disk. This is useful for cases of a configuration management system or a
      package manager wiping out your sentinel config while the process is
      still running - and has not yet been restarted. It can also be useful
      for scripting a backup and migrate or clone of a running sentinel.
      22ee2f9c
  10. 19 May, 2015 2 commits
  11. 15 May, 2015 3 commits
  12. 05 May, 2015 2 commits
  13. 04 May, 2015 8 commits
    • FuGangqiang's avatar
      sdsfree x and y · 8db39699
      FuGangqiang authored
      8db39699
    • FuGangqiang's avatar
      fix doc example · 98756d4c
      FuGangqiang authored
      98756d4c
    • FuGangqiang's avatar
      fix typo · 7316fda3
      FuGangqiang authored
      7316fda3
    • Itamar Haber's avatar
      update copyright year · a5bada19
      Itamar Haber authored
      a5bada19
    • therealbill's avatar
      Making sentinel flush config on +slave · f0ab4fd6
      therealbill authored
      Originally, only the +slave event which occurs when a slave is
      reconfigured during sentinelResetMasterAndChangeAddress triggers a flush
      of the config to disk.  However, newly discovered slaves don't
      apparently trigger this flush but do trigger the +slave event issuance.
      
      So if you start up a sentinel, add a master, then add a slave to the
      master (as a way to reproduce it) you'll see the +slave event issued,
      but the sentinel config won't be updated with the known-slave entry.
      
      This change makes sentinel do the flush of the config if a new slave is
      deteted in sentinelRefreshInstanceInfo.
      f0ab4fd6
    • antirez's avatar
      Sentinel: remove useless sentinelFlushConfig() call · e4c54498
      antirez authored
      To rewrite the config in the loop that adds slaves back after a master
      reset, in order to handle switching to another master, is useless: it
      just adds latency since there is an fsync call in the inner loop,
      without providing any additional guarantee, but the contrary, since if
      after the first loop iteration the server crashes we end with just a
      single slave entry losing all the other informations.
      
      It is wiser to rewrite the config at the end when the full new
      state is configured.
      e4c54498
    • Yossi Gottlieb's avatar
    • clark.kang's avatar
      fix sentinel memory leak · c4d4c1ed
      clark.kang authored
      c4d4c1ed