- 22 Jun, 2015 3 commits
-
-
antirez authored
Server output is matched to a pre-computed output. The last digits differ because of rouding errors.
-
antirez authored
-
Matt Stancliff authored
Current todo: - replace functions in zset.{c,h} with a new unified Redis zset access API. Once we get the zset interface fixed, we can squash relevant commits in this branch and have one nice commit to merge into unstable. This commit adds: - Geo commands - Tests; runnable with: ./runtest --single unit/geo - Geo helpers in deps/geohash-int/ - src/geo.{c,h} and src/geojson.{c,h} implementing geo commands - Updated build configurations to get everything working - TEMPORARY: src/zset.{c,h} implementing zset score and zset range reading without writing to client output buffers. - Modified linkage of one t_zset.c function for use in zset.c Conflicts: src/Makefile src/redis.c
-
- 12 Jun, 2015 1 commit
-
-
antirez authored
We have a check to rewrite the config properly when a failover is in progress, in order to add the current (already failed over) master as slave, and don't include in the slave list the promoted slave itself. However there was an issue, the variable with the right address was computed but never used when the code was modified, and no tests are available for this feature for two reasons: 1. The Sentinel unit test currently does not test Sentinel ability to persist its state at all. 2. It is a very hard to trigger state since it lasts for little time in the context of the testing framework. However this feature should be covered in the test in some way. The bug was found by @badboy using the clang static analyzer. Effects of the bug on safety of Sentinel === This bug results in severe issues in the following case: 1. A Sentinel is elected leader. 2. During the failover, it persists a wrong config with a known-slave entry listing the master address. 3. The Sentinel crashes and restarts, reading invalid configuration from disk. 4. It sees that the slave now does not obey the logical configuration (should replicate from the current master), so it sends a SLAVEOF command to the master (since the slave master is the same) creating a replication loop (attempt to replicate from itself) which Redis is currently unable to detect. 5. This means that the master is no longer available because of the bug. However the lack of availability should be only transient (at least in my tests, but other states could be possible where the problem is not recovered automatically) because: 6. Sentinels treat masters reporting to be slaves as failing. 7. A new failover is triggered, and a slave is promoted to master. Bug lifetime === The bug is there forever. Commit 16237d78 actually tried to fix the bug but in the wrong way (the computed variable was never used! My fault). So this bug is there basically since the start of Sentinel. Since the bug is hard to trigger, I remember little reports matching this condition, but I remember at least a few. Also in automated tests where instances were stopped and restarted multiple times automatically I remember hitting this issue, however I was not able to reproduce nor to determine with the information I had at the time what was causing the issue.
-
- 11 Jun, 2015 5 commits
-
-
Salvatore Sanfilippo authored
Update t_zset.c
-
antirez authored
We usually want to reach the master using the address of the interface Redis is bound to (via the "bind" config option). That's useful since the master will get (and publish) the slave address getting the peer name of the incoming socket connection from the slave. However, when this is not possible, for example because the slave is bound to the loopback interface but repliaces from a master accessed via an external interface, we want to still connect with the master even from a different interface: in this case it is not really important that the master will provide any other address, while it is vital to be able to replicate correctly. Related to issues #2609 and #2612.
-
antirez authored
This performs a best effort source address binding attempt. If it is possible to bind the local address and still have a successful connect(), then this socket is returned. Otherwise the call is retried without source address binding attempt. Related to issues #2609 and #2612.
-
antirez authored
Two code paths jumped to the "ok, return the socket to the user" code path to handle error conditions. Related to issues #2609 and #2612.
-
antirez authored
Related to issues #2609 and #2612.
-
- 03 Jun, 2015 3 commits
-
-
Ben Murphy authored
-
Ben Murphy authored
-
antirez authored
-
- 02 Jun, 2015 1 commit
-
-
linfangrong authored
-
- 29 May, 2015 7 commits
-
-
antirez authored
-
antirez authored
-
antirez authored
From Twitter: "@antirez that’s an awfully-named command :( http://en.wikipedia.org/wiki/Retching"
-
antirez authored
-
antirez authored
-
antirez authored
Normally ZADD only returns the number of elements added to a sorted set, using the RETCH option it returns the sum of elements added or for which the score was updated.
-
antirez authored
-
- 28 May, 2015 3 commits
-
-
antirez authored
-
Salvatore Sanfilippo authored
Update anet.c
-
Salvatore Sanfilippo authored
Removed incorrect suggestion
-
- 25 May, 2015 3 commits
-
-
Salvatore Sanfilippo authored
adding a sentinel command: "flushconfig" per RCP4
-
antirez authored
-
antirez authored
-
- 22 May, 2015 1 commit
-
-
antirez authored
This commit adds the SENTINEL simulate-failure, that sets specific hooks inside the state machine that will crash Sentinel, for testing purposes.
-
- 21 May, 2015 2 commits
-
-
Itamar Haber authored
DEL/INCR/DECR and others could be NTH but apparently never made it to the implementation of SORT
-
Huachao Huang authored
-
- 20 May, 2015 1 commit
-
-
antirez authored
Trivial omission of the obvious no-match case.
-
- 19 May, 2015 2 commits
- 18 May, 2015 1 commit
-
-
antirez authored
A way for monitoring systems to check that Sentinel is technically able to reach the quorum and failover, using the currently visible Sentinels.
-
- 15 May, 2015 4 commits
-
-
antirez authored
-
Salvatore Sanfilippo authored
Issue #2517, smove contract violation
-
Salvatore Sanfilippo authored
protocol error log should be seen by debug/verbose level
-
antirez authored
-
- 14 May, 2015 3 commits