1. 08 2月, 2014 1 次提交
  2. 07 2月, 2014 1 次提交
  3. 05 2月, 2014 1 次提交
    • A
      Check for EAGAIN in sendBulkToSlave(). · 301a0cfc
      antirez 提交于
      Sometime an osx master with a Linux server over a slow link caused
      a strange error where osx called the writable function for
      the socket but actually apparently there was no room in the socket
      buffer to accept the write: write(2) call returned an EAGAIN error,
      that was not checked, so we considered write(2) == 0 always as a connection
      reset, which was unfortunate since the bulk transfer has to start again.
      
      Also more errors are logged with the WARNING level in the same code path
      now.
      301a0cfc
  4. 04 2月, 2014 1 次提交
  5. 03 2月, 2014 5 次提交
    • A
      Move mstime_t define outside sentinel.c. · ddcf1603
      antirez 提交于
      The define is now used in other parts of Redis 2.8 tree instead of long
      long.
      
      A nice side effect is that now 2.8 and unstable sentinel.c files are
      identical as it should be.
      ddcf1603
    • A
      Scripting: expire keys in scripts only at first access. · c5bc5926
      antirez 提交于
      Keys expiring in the middle of the execution of Lua scripts are to
      create inconsistencies in masters and / or AOF files. See the following
      example:
      
          if redis.call("exists",KEYS[1]) == 1
          then
              redis.call("incr","mycounter")
          end
      
          if redis.call("exists",KEYS[1]) == 1
          then
              return redis.call("incr","mycounter")
          end
      
      The script executes two times the same *if key exists then incrementcounter*
      logic. However the two executions will work differently in the master and
      the slaves, provided some unlucky timing happens.
      
      In the master the first time the key may still exist, while the second time
      the key may no longer exist. This will result in the key incremented just one
      time. However as a side effect the master will generate a synthetic
      `DEL` command in the replication channel in order to force the slaves to
      expire the key (given that key expiration is master-driven).
      
      When the same script will run in the slave, the key will no longer be
      there, so the script will not increment the key.
      
      The key idea used to implement the expire-at-first-lookup semantics was
      provided by Marc Gravell.
      c5bc5926
    • A
      Allow CONFIG and SHUTDOWN while in stale-slave state. · 5201ca0c
      antirez 提交于
      5201ca0c
    • A
      Scripting: use mstime() and mstime_t for lua_time_start. · 3da5cbe5
      antirez 提交于
      server.lua_time_start is expressed in milliseconds. Use mstime_t instead
      of long long, and populate it with mstime() instead of ustime()/1000.
      
      Functionally identical but more natural.
      3da5cbe5
    • P
      update copyright year · 0be31e2d
      PatrickJS 提交于
      0be31e2d
  6. 31 1月, 2014 5 次提交
  7. 28 1月, 2014 2 次提交
  8. 25 1月, 2014 1 次提交
  9. 22 1月, 2014 3 次提交
  10. 14 1月, 2014 3 次提交
  11. 13 1月, 2014 12 次提交
  12. 09 1月, 2014 4 次提交
  13. 08 1月, 2014 1 次提交
    • A
      Don't send REPLCONF ACK to old masters. · 2a1a31ca
      antirez 提交于
      Masters not understanding REPLCONF ACK will reply with errors to our
      requests causing a number of possible issues.
      
      This commit detects a global replication offest set to -1 at the end of
      the replication, and marks the client representing the master with the
      REDIS_PRE_PSYNC flag.
      
      Note that this flag was called REDIS_PRE_PSYNC_SLAVE but now it is just
      REDIS_PRE_PSYNC as it is used for both slaves and masters starting with
      this commit.
      
      This commit fixes issue #1488.
      2a1a31ca