- 15 Mar, 2014 1 commit
-
-
antirez authored
This makes debugging / monitoring of Sentinels simpler since you can identify sentinels in CLIENT LIST output of Redis instances.
-
- 14 Mar, 2014 4 commits
-
-
Matt Stancliff authored
argc == 2; argv[2] == crash
-
antirez authored
Sentinel's main safety argument is that there are no two configurations for the same master with the same version (configuration epoch). For this to be true Sentinels require to be authorized by a majority. Additionally Sentinels require to do two important things: * Never vote again for the same epoch. * Never exchange an old vote for a fresh one. The first prerequisite, in a crash-recovery system model, requires to persist the master->leader_epoch on durable storage before to reply to messages. This was not the case. We also make sure to persist the current epoch in order to never reply to stale votes requests from other Sentinels, after a recovery. The configuration is persisted by making use of fsync(), this is considered in the context of this code a good enough guarantee that after a restart our durable state is restored, however this may not always be the case depending on the kind of hardware and operating system used.
-
antirez authored
Now the way HELLO messages are received is unified. Now it is no longer needed for Sentinels to converge to the higher configuration for a master to be able to chat via some Redis instance, the are able to directly exchanges configurations. Note that this commit does not include the (trivial) change needed to send HELLO messages to Sentinel instances as well, since for an error I committed the change in the previous commit that refactored hello messages processing into a separated function.
-
antirez authored
-
- 04 Mar, 2014 2 commits
-
-
Jan-Erik Rediger authored
-
antirez authored
Sentinel needs to avoid split brain conditions due to multiple sentinels trying to get voted at the exact same time. So far some desynchronization was provided by fluctuating server.hz, that is the frequency of the timer function call. However the desynchonization provided in this way was not enough when using many Sentinel instances, especially when a large quorum value is used in order to force a greater degree of agreement (more than N/2+1). It was verified that it was likely to trigger a split brain condition, forcing the system to try again after a timeout. Usually the system will succeed after a few retries, but this is not optimal. This commit desynchronizes instances in a more effective way to make it likely that the first attempt will be successful.
-
- 24 Feb, 2014 4 commits
- 22 Feb, 2014 1 commit
-
-
antirez authored
This error was conceived for the older version of Sentinel that worked via master redirection and that was not able to get configuration updates from other Sentinels via the Pub/Sub channel of masters or slaves. This reply does not make sense today, every Sentinel should reply with the best information it has currently. The error will make even more sense in the future since the plan is to allow Sentinels to update the configuration of other Sentinels via gossip with a direct chat without the prerequisite that they have at least a monitored instance in common.
-
- 20 Feb, 2014 1 commit
-
-
antirez authored
This is useful mostly for debugging of issues.
-
- 18 Feb, 2014 2 commits
-
-
antirez authored
Rename define to match the new meaning.
-
antirez authored
If we can't reconfigure a slave in time during failover, go forward as anyway the slave will be fixed by Sentinels in the future, once they detect it is misconfigured. Otherwise a failover in progress may never terminate if for some reason the slave is uncapable to sync with the master while at the same time it is not disconnected.
-
- 17 Feb, 2014 1 commit
-
-
antirez authored
Now it logs the file name if it is not accessible. Also there is a different error for the missing config file case, and for the non writable file case.
-
- 07 Feb, 2014 1 commit
-
-
antirez authored
-
- 31 Jan, 2014 1 commit
-
-
antirez authored
This fixes issue #1530.
-
- 14 Jan, 2014 1 commit
-
-
antirez authored
-
- 13 Jan, 2014 3 commits
- 10 Jan, 2014 7 commits
-
-
antirez authored
The command totally removes a monitored master.
-
antirez authored
The claim about unlinking the instance from the connected hash tables was the opposite of the reality. Also the current actual behavior is safer in most cases, so it is better to manually unlink when needed.
-
antirez authored
-
antirez authored
It allows to add new masters to monitor at runtime.
-
antirez authored
With SENTINEL MASTERS it was already possible to list all the configured masters, but not a specific one.
-
antirez authored
Note: the auth password with the master is voluntarily not exposed.
-
antirez authored
-
- 13 Dec, 2013 1 commit
-
-
antirez authored
-
- 10 Dec, 2013 1 commit
-
-
antirez authored
Redis hash table implementation has many non-blocking features like incremental rehashing, however while deleting a large hash table there was no way to have a callback called to do some incremental work. This commit adds this support, as an optiona callback argument to dictEmpty() that is currently called at a fixed interval (one time every 65k deletions).
-
- 06 Dec, 2013 2 commits
-
-
antirez authored
The way the role change was recoded was not sane and too much convoluted, causing the role information to be not always updated. This commit fixes issue #1445.
-
antirez authored
When there is a master address switch, the reported role must be set to master so that we have a chance to re-sample the INFO output to check if the new address is reporting the right role. Otherwise if the role was wrong, it will be sensed as wrong even after the address switch, and for enough time according to the role change time, for Sentinel consider the master SDOWN. This fixes isue #1446, that describes the effects of this bug in practice.
-
- 05 Dec, 2013 1 commit
-
-
antirez authored
-
- 02 Dec, 2013 2 commits
-
-
antirez authored
See issue #1419.
-
antirez authored
Sentinels are now desynchronized in a better way changing the time handler frequency between 10 and 20 HZ. This way on average a desynchronization of 25 milliesconds is produced that should be larger enough compared to network latency, avoiding most split-brain condition during the vote. Now that the clocks are desynchronized, to have larger random delays when performing operations can be easily achieved in the following way. Take as example the function that starts the failover, that is called with a frequency between 10 and 20 HZ and will start the failover every time there are the conditions. By just adding as an additional condition something like rand()%4 == 0, we can amplify the desynchronization between Sentinel instances easily. See issue #1419.
-
- 28 Nov, 2013 1 commit
-
-
antirez authored
-
- 26 Nov, 2013 1 commit
-
-
huangz1990 authored
-
- 25 Nov, 2013 2 commits
-
-
antirez authored
The result of this one-char bug was pretty serious, if the new master had the same port of the previous master, but just a different IP address, non-leader Sentinels would not be able to recognize the configuration change. This commit fixes issue #1394. Many thanks to @shanemadden that reported the bug and helped investigating it.
-
antirez authored
This fixes issue #1395.
-