- 05 Aug, 2015 6 commits
-
-
antirez authored
-
antirez authored
-
antirez authored
-
antirez authored
-
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.
-
antirez authored
Thanks to Oran Agra from Redis Labs for providing this patch.
-
- 17 Jul, 2015 2 commits
-
-
Salvatore Sanfilippo authored
bugfix: errno might change before logging
-
Salvatore Sanfilippo authored
Fix: aof_delayed_fsync is not reset, fixes #2677
-
- 16 Jul, 2015 1 commit
-
-
Tom Kiemes authored
aof_delayed_fsync was not set to 0 when calling CONFIG RESETSTAT
-
- 13 Jul, 2015 1 commit
-
-
Yongyue Sun authored
Signed-off-by:
Yongyue Sun <abioy.sun@gmail.com>
-
- 04 Jun, 2015 2 commits
- 03 Jun, 2015 3 commits
-
-
Ben Murphy authored
-
Ben Murphy authored
-
antirez authored
-
- 25 May, 2015 1 commit
-
-
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.
-
- 19 May, 2015 2 commits
- 15 May, 2015 3 commits
-
-
antirez authored
-
Glenn Nethercutt authored
uphold the smove contract to return 0 when the element is not a member of the source set, even if source=dest
-
Jungtaek Lim authored
-
- 05 May, 2015 2 commits
- 04 May, 2015 8 commits
-
-
FuGangqiang authored
-
FuGangqiang authored
-
FuGangqiang authored
-
Itamar Haber authored
-
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.
-
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.
-
Yossi Gottlieb authored
limit.
-
clark.kang authored
-
- 28 Apr, 2015 1 commit
-
-
antirez authored
This fixes issue #2535, that was actually an hiredis library bug (I submitted an issue and fix to the redis/hiredis repo as well). When an asynchronous hiredis connection subscribes to a Pub/Sub channel and gets an error, and in other related conditions, the function redisProcessCallbacks() enters a code path where the link is disconnected, however the function returns before freeing the allocated reply object. This causes a memory leak. The memory leak was trivial to trigger in Redis Sentinel, which uses hiredis, every time we tried to subscribe to an instance that required a password, in case the Sentinel was configured either with the wrong password or without password at all. In this case, the -AUTH error caused the leaking code path to be executed. It was verified with Valgrind that after this change the leak no longer happens in Sentinel with a misconfigured authentication password.
-
- 27 Apr, 2015 1 commit
-
-
antirez authored
-
- 01 Apr, 2015 1 commit
-
-
Oran Agra authored
master was closing the connection if the RDB transfer took long time. and also sent PINGs to the slave before it got the initial ACK, in which case the slave wouldn't be able to find the EOF marker.
-
- 27 Mar, 2015 1 commit
-
-
antirez authored
-
- 24 Mar, 2015 1 commit
-
-
antirez authored
Bug as old as Redis and blocking operations. It's hard to trigger since only happens on instance role switch, but the results are quite bad since an inconsistency between master and slave is created. How to trigger the bug is a good description of the bug itself. 1. Client does "BLPOP mylist 0" in master. 2. Master is turned into slave, that replicates from New-Master. 3. Client does "LPUSH mylist foo" in New-Master. 4. New-Master propagates write to slave. 5. Slave receives the LPUSH, the blocked client get served. Now Master "mylist" key has "foo", Slave "mylist" key is empty. Highlights: * At step "2" above, the client remains attached, basically escaping any check performed during command dispatch: read only slave, in that case. * At step "5" the slave (that was the master), serves the blocked client consuming a list element, which is not consumed on the master side. This scenario is technically likely to happen during failovers, however since Redis Sentinel already disconnects clients using the CLIENT command when changing the role of the instance, the bug is avoided in Sentinel deployments. Closes #2473.
-
- 08 Mar, 2015 1 commit
-
-
antirez authored
-
- 04 Mar, 2015 1 commit
-
-
antirez authored
Itereator misuse due to analyzeLatencyForEvent() accessing the dictionary during the iteration, without the iterator being reclared as safe.
-
- 10 Feb, 2015 2 commits
-
-
Charles Hooper authored
-
antirez authored
-