summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Sentinel: SENTINEL CKQUORUM commandsentinel-32antirez2015-05-181-0/+51
| | | | | A way for monitoring systems to check that Sentinel is technically able to reach the quorum and failover, using the currently visible Sentinels.
* Sentinel: port address update code to shared links logicantirez2015-05-151-2/+38
|
* Sentinel: config-rewrite unique ID just one timeantirez2015-05-141-4/+4
|
* Sentinel: remove debugging message from releaseInstanceLink()antirez2015-05-141-1/+0
|
* Sentinel: fix access to NULL link->cc in releaseInstanceLink()antirez2015-05-141-1/+1
|
* Sentinel: remove SHARED! debugging printfantirez2015-05-141-1/+0
|
* Sentinel: rewrite callback chain removing instances with shared linksantirez2015-05-141-1/+17
| | | | | Otherwise pending commands callbacks will fire with a reference that no longer exists.
* Sentinel: debugging code removed from sentinelSendPing()antirez2015-05-141-9/+0
|
* Sentinel: use active/last time for ping logicantirez2015-05-141-21/+37
| | | | | | | | | | | | | | | | | | | The PING trigger was improved again by using two fields instead of a single one to remember when the last ping was sent: 1. The "active" ping is the time at which we sent the last ping that still received no reply. However we continue to ping non replying instances even if they have an old active ping: the link may be disconnected and reconencted in the meantime so the older pings may get lost even if it's a TCP socket. 2. The "last" ping is the time at which we really sent the last ping on the wire, and this is used in order to throttle the amount of pings we send during failures (when no pong is received). All in all the failure detector effectiveness should be identical but we avoid to flood instances with pings during failures or when they are slow.
* Sentinel: limit reconnection frequency to the ping periodantirez2015-05-131-0/+7
|
* Sentinel: PING trigger improvedantirez2015-05-121-1/+4
| | | | | | | | It's ok to ping as soon as the ping period has elapsed since we received the last PONG, but it's not good that we ping again if there is a pending ping... With this change we'll send a new ping if there is one pending only if two times the ping period elapsed since the ping which is still pending was sent.
* Sentinel: same-Sentinel link sharing across mastersantirez2015-05-121-9/+34
|
* Sentinel: add sentinelGetInstanceTypeString() fuctionantirez2015-05-121-0/+7
| | | | | | This is useful for debugging and logging activities: given a sentinelRedisInstance object returns a C string representing the instance type: master, slave, sentinel.
* Sentinel: add link refcount to instance descriptionantirez2015-05-111-0/+4
|
* Sentinel: connection sharing WIP #1antirez2015-05-111-220/+295
|
* Sentinel: suppress warnings for not used args.antirez2015-05-081-0/+2
|
* Sentinel: generate +sentinel again, removed in prev commit.antirez2015-05-081-0/+1
|
* Sentinel: Use privdata instead of c->data in sentinelReceiveHelloMessages()antirez2015-05-081-6/+4
| | | | | This way we may later share the hiredis link "c" among the same Sentinel instance referenced multiple times for multiple masters.
* Sentinel: clarify arguments of SENTINEL IS-MASTER-DOWN-BY-ADDRantirez2015-05-081-1/+17
|
* Sentinel: don't detect duplicated Sentinels, just address switchantirez2015-05-071-26/+17
| | | | | | | 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.
* Sentinel: persist its unique ID across restarts.antirez2015-05-061-17/+42
| | | | | | | | | | | | | 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).
* Substitute DISQUE to REDIS after merge from Disqueantirez2015-05-051-1/+1
| | | | | Probably this stuff should be called CLIENT_* in order to cross merge more easily.
* processUnblockedClients: don't process clients that blocekd againantirez2015-05-051-3/+8
|
* Don't put clients into unblocked list multiple timesantirez2015-05-051-2/+6
|
* Fix order of release scripts.antirez2015-05-052-0/+0
|
* Merge pull request #2530 from FuGangqiang/unstableSalvatore Sanfilippo2015-05-041-2/+5
|\ | | | | fix sds.c
| * sdsfree x and yFuGangqiang2015-04-201-0/+3
| |
| * fix doc exampleFuGangqiang2015-04-201-1/+1
| |
| * fix typoFuGangqiang2015-04-191-1/+1
| |
* | Merge pull request #2534 from itamarhaber/patch-3Salvatore Sanfilippo2015-05-041-1/+1
|\ \ | | | | | | update copyright year
| * | update copyright yearItamar Haber2015-04-211-1/+1
| |/
* | Making sentinel flush config on +slavetherealbill2015-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Sentinel: remove useless sentinelFlushConfig() callantirez2015-05-041-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #2542 from yossigo/lua_client_buffer_crashSalvatore Sanfilippo2015-05-041-1/+1
|\ \ | | | | | | Fix Redis server crash when Lua command exceeds client output buffer limit.
| * | Fix Redis server crash when Lua command exceeds client output bufferYossi Gottlieb2015-04-261-1/+1
| | | | | | | | | | | | limit.
* | | Merge pull request #2551 from charsyam/feature/sentinel-memory-leak-1Salvatore Sanfilippo2015-05-041-0/+1
|\ \ \ | | | | | | | | fix sentinel memory leak
| * | | fix sentinel memory leakclark.kang2015-04-291-0/+1
| | | |
* | | | Merge branch 'unstable' of github.com:/antirez/redis into unstableantirez2015-04-291-3/+3
|\ \ \ \
| * \ \ \ Merge pull request #2550 from badboy/readme-fixesSalvatore Sanfilippo2015-04-291-3/+3
| |\ \ \ \ | | | | | | | | | | | | Fix spelling and grammatical errors in readme
| | * | | | One more small fixJan-Erik Rediger2015-04-281-1/+1
| | | | | |
| | * | | | Fix spelling and grammatical errors in readmeJan-Erik Rediger2015-04-281-3/+3
| | |/ / / | | | | | | | | | | | | | | | Closes #2549
* | | | | Add header guard for ziplist.hantirez2015-04-291-0/+5
|/ / / / | | | | | | | | | | | | As suggested in #2543.
* | | | Fix Sentinel memory leak (hiredis bug)antirez2015-04-281-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | sha1.c: use standard uint32_t.antirez2015-04-272-11/+11
| | |
* | | Merge branch 'unstable' of github.com:/antirez/redis into unstableantirez2015-04-271-1/+1
|\ \ \ | |/ /
| * | Merge pull request #2539 from itamarhaber/patch-4Salvatore Sanfilippo2015-04-241-1/+1
| |\ \ | | |/ | |/| Added reference to IANA ticket for port 6379
| | * Added reference to IANA ticket for port 6379Itamar Haber2015-04-241-1/+1
| |/ | | | | Just so it's extra official :smile:
* | Example redis.conf doc about pidfile fixed.antirez2015-04-261-2/+9
|/ | | | An user changed the behavior via a PR without upgrading the doc.
* Net: improve prepareClientToWrite() error handling and comments.antirez2015-04-012-10/+37
| | | | | | | | | | | | | When we fail to setup the write handler it does not make sense to take the client around, it is missing writes: whatever is a client or a slave anyway the connection should terminated ASAP. Moreover what the function does exactly with its return value, and in which case the write handler is installed on the socket, was not clear, so the functions comment are improved to make the goals of the function more obvious. Also related to #2485.
* Merge pull request #2485 from oranagra/diskless-repl-fixesSalvatore Sanfilippo2015-04-012-1/+2
|\ | | | | fixes to diskless replication.