- 12 May, 2015 1 commit
-
-
antirez authored
This is useful for debugging and logging activities: given a sentinelRedisInstance object returns a C string representing the instance type: master, slave, sentinel.
-
- 11 May, 2015 2 commits
- 08 May, 2015 4 commits
- 07 May, 2015 1 commit
-
-
antirez authored
Since with a previous commit Sentinels now persist their unique ID, we no longer need to detect duplicated Sentinels and re-add them. We remove and re-add back using different events only in the case of address switch of the same Sentinel, without generating a new +sentinel event.
-
- 06 May, 2015 1 commit
-
-
antirez authored
Previously Sentinels always changed unique ID across restarts, relying on the server.runid field. This is not a good idea, and forced Sentinel to rely on detection of duplicated Sentinels and a potentially dangerous clean-up and re-add operation of the Sentinel instance that was rebooted. Now the ID is generated at the first start and persisted in the configuration file, so that a given Sentinel will have its unique ID forever (unless the configuration is manually deleted or there is a filesystem corruption).
-
- 04 May, 2015 2 commits
-
-
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.
-
- 28 Apr, 2015 1 commit
-
-
clark.kang authored
-
- 02 Feb, 2015 1 commit
-
-
Leandro López (inkel) authored
When trying to debug sentinel connections or max connections errors it would be very useful to have the ability to see the list of connected clients to a running sentinel. At the same time it would be very helpful to be able to name each sentinel connection or kill offending clients. This commits adds the already defined CLIENT commands back to Redis Sentinel.
-
- 23 Dec, 2014 3 commits
-
-
Matt Stancliff authored
-
Matt Stancliff authored
Refactor a common pattern into one function so we don't end up with copy/paste programming.
-
Matt Stancliff authored
-
- 11 Dec, 2014 4 commits
-
-
antirez authored
Specialized single-use function. Not the best match for sds.c btw. Also genClientPeerId() is no longer static: we need symbols.
-
antirez authored
A few code style changes + consistent format: not nice for humans but better for parsers.
-
Matt Stancliff authored
Improvements: - Return empty string if asking for non-existing section (INFO foo) - Fix potential memory leak (caused by sdsempty() then returned if >2 args) - Clean up argument parsing - Allow "all" as valid section (same as "default" or zero args currently) - Move strcasecmp to end of evaluation chain in conditionals Also, since we're C99, I moved some variable declarations to be closer to where they are actually used (saves us from needing to free an empty info if detect argument errors up front). Closes #1915 Closes #1966
-
Matt Stancliff authored
Instead of manually checking for strchr(n,':') everywhere, we can use our new centralized IP formatting functions.
-
- 10 Dec, 2014 4 commits
-
-
antirez authored
Changed in order to make them more review friendly, based on the experience of reviewing the code myself.
-
antirez authored
I guess the initial goal of the initialization was to suppress GCC warning, but if we have to initialize, we can do it with the base-case value instead of NULL which is never retained.
-
antirez authored
-
antirez authored
-
- 20 Nov, 2014 2 commits
-
-
Matt Stancliff authored
Sentinel queries the INFO from every master and from every replica of every master. We can cache the INFO results in Sentinel so Sentinel can be a single place to quickly get all INFO output for an entire Sentinel monitoring group. This commit gives us SENTINEL INFO-CACHE in two forms: - SENTINEL INFO-CACHE — returns all masters and all replicas - SENTINEL INFO-CACHE master0 master1 ... masterN — vararg specify masters Results are returned as a multibulk reply with two top-level entries for each master. The first entry for each master is the name of the master. The second entry is a nested multibulk reply with the contents of INFO, first for the master, then an additional entry for each of the replicas.
-
Matt Stancliff authored
Fixes #2054
-
- 29 Sep, 2014 1 commit
-
-
Matt Stancliff authored
- Remove trailing newlines from redis.conf - Fix comment misspelling - Clarifies zipEncodeLength usage and a C API mention (#1243, #1242) - Fix cluster typos (inspired by @papanikge #1507) - Fix rewite -> rewrite in a few places (inspired by #682) Closes #1243, #1242, #1507
-
- 11 Sep, 2014 2 commits
-
-
antirez authored
-
antirez authored
The code to check the number of voters was never updated to follow the new Sentinel specification, so the number of voters was computed using only the set of Sentinels that provided a vote. This means that there is a changing majority on partitions, even if usually the issue is not triggered because of the configured quorum check (what was broken was the other implicit check that requires anyway half of the known sentinels to agree in order to start a failover).
-
- 04 Sep, 2014 3 commits
-
-
antirez authored
-
antirez authored
The original implementation was modified in order to allow to selectively announce a different IP or port, and to rewrite the two options in the config file after a rewrite.
-
Dara Kong authored
There are instances such as EC2 where the bind address is private (behind a NAT) and cannot be accessible from WAN. https://groups.google.com/d/msg/redis-db/PVVvjO4nMd0/P3oWC036v3cJ
-
- 01 Sep, 2014 1 commit
-
-
Matt Stancliff authored
We can save a little work by aborting when we enter the function if we're disconnected.
-
- 25 Aug, 2014 2 commits
-
-
Matt Stancliff authored
Clearly ip[32] is wrong, but it's less clear that buf[32] was wrong without further reading.
-
Eiichi Sato authored
Closes #1914
-
- 13 Aug, 2014 1 commit
-
-
antirez authored
-
- 23 Jun, 2014 2 commits
-
-
antirez authored
-
Matt Stancliff authored
Some deployments need traffic sent from a specific address. This change uses the same policy as Cluster where the first listed bindaddr becomes the source address for outgoing Sentinel communication. Fixes #1667
-
- 19 Jun, 2014 2 commits
-
-
antirez authored
Eventual configuration convergence is guaranteed by our periodic hello messages to all the instances, however when there are important notices to share, better make a phone call. With this commit we force an hello message to other Sentinal and Redis instances within the next 100 milliseconds of a config update, which is practically better than waiting a few seconds.
-
antirez authored
Lack of check of the SRI_PROMOTED flag caused Sentienl to act with the promoted slave turned into a master during failover like if it was a normal instance. Normally this problem was not apparent because during real failovers the old master is down so the bugged code path was not entered, however with manual failovers via the SENTINEL FAILOVER command, the problem was easily triggered. This commit prevents promoted slaves from getting reconfigured, moreover we now explicitly check that during a failover the slave turning into a master is the one we selected for promotion and not a different one.
-