Commit Graph

3309 Commits

Author SHA1 Message Date
antirez
cbdb2153c5 min-slaves-to-write: initial description of the feature in redis.conf 2013-05-30 11:29:58 +02:00
antirez
888400ebd5 repl_offset field in INFO replication is now just offset. 2013-05-29 19:56:33 +02:00
antirez
37c29e037b Slaves list in INFO output: lag added, format changed.
There is a new 'lag' information in the list of slaves, in the
"replication" section of the INFO output.

Also the format was changed in a backward incompatible way in order to
make it more easy to parse if new fields are added in the future, as the
new format is comma separated but has named fields (no longer positional
fields).
2013-05-29 19:54:44 +02:00
antirez
091ed386f7 Accept REPLCONF in any state. 2013-05-28 15:26:20 +02:00
antirez
a864cae2a5 A comment about BLPOP timeout did not reflected actual behavior. 2013-05-27 19:34:14 +02:00
antirez
1909b8753d Version bumped to 2.9.11 2013-05-27 11:44:04 +02:00
antirez
c9b55a29d6 redis.conf updated: repl-timeout now uesd by masters as well. 2013-05-27 11:42:45 +02:00
antirez
3c82c85fcf Close connection with timedout slaves.
Now masters, using the time at which the last REPLCONF ACK was received,
are able to explicitly disconnect slaves that are no longer responding.

Previously the only chance was to see a very long output buffer, that
was highly suboptimal.
2013-05-27 11:42:42 +02:00
antirez
e06a560466 Send ACK to master once every second.
ACKs can be also used as a base for synchronous replication. However in
that case they'll be explicitly requested by the master when the client
sends a request that needs to be replicated synchronously.
2013-05-27 11:42:38 +02:00
antirez
efd87031d0 Don't ACK the master after every command.
Sending an ACK is now moved into the replicationSendAck() function.
2013-05-27 11:42:35 +02:00
antirez
dd0adbb777 Make sure that REPLCONF ACK really has no return value. 2013-05-27 11:42:30 +02:00
antirez
0292c5f7ae Replication: send REPLCONF ACK to master. 2013-05-27 11:42:25 +02:00
antirez
6b4635f4f5 REPLCONF ACK command.
This special command is used by the slave to inform the master the
amount of replication stream it currently consumed.

it does not return anything so that we not need to consume additional
bandwidth needed by the master to reply something.

The master can do a number of things knowing the amount of stream
processed, such as understanding the "lag" in bytes of the slave, verify
if a given command was already processed by the slave, and so forth.
2013-05-27 11:42:17 +02:00
antirez
a950f48906 Fixed a bug in no queueing replies to master. 2013-05-25 01:00:07 +02:00
antirez
dd937030f0 Replication: don't even queue replies to master commands.
When master send commands, there is no need for the slave to reply.
Redis used to queue the reply in the output buffer and discard the reply
later, this is a waste of work and it is not clear why it was this way
(I sincerely don't remember).

This commit changes it in order to don't queue the reply at all.

All tests passing.
2013-05-24 18:58:57 +02:00
antirez
c853239a5e Top comment for prepareClientToWrite() clarified.
We don't write the output buffer to the client socket for slaves only if
the slave is not online.
2013-05-24 18:41:43 +02:00
antirez
5d0f408d42 Don't stop reading redis.conf if line has no args.
Should be "continue" and was "return".

This fixes issue #1110
2013-05-18 16:21:52 +02:00
antirez
92f18d04a0 Merge branch 'config-rewrite' into unstable 2013-05-15 11:58:21 +02:00
antirez
78167807be Use memtoll() when parsing the backlog-size option. 2013-05-15 11:55:14 +02:00
antirez
25f2be6267 CONFIG REWRITE: backlog size is a bytes option. 2013-05-15 11:39:29 +02:00
antirez
cd48e4fc40 CONFIG REWRITE: bindaddr -> bind. 2013-05-15 11:38:43 +02:00
antirez
8a44e6c490 CONFIG REWRITE: when rewriting amount of bytes use GB, MB, KB if possible. 2013-05-15 11:33:02 +02:00
antirez
c590e18d15 CONFIG REWRITE: correctly escape the notify-keyspace-events option. 2013-05-15 11:15:31 +02:00
antirez
328843849f CONFIG REWRITE: "active-rehashing" -> "activerehashing". 2013-05-15 11:09:19 +02:00
antirez
402a0f1ca0 CONFIG REWRITE: fixed typo in AOF fsync policy. 2013-05-15 11:06:56 +02:00
antirez
72e980231c CONFIG REWRITE: repl-disable-tcp-nodelay is a boolean option. 2013-05-15 11:04:53 +02:00
antirez
86a6aad984 Test default config modified to set logfile to empty string.
Required because of recent changes in the way logfile is set to standard
output.
2013-05-15 10:19:14 +02:00
antirez
310dbba01c Added a define for most configuration defaults.
Also the logfile option was modified to always have an explicit value
and to log to stdout when an empty string is used as log file.

Previously there was special handling of the string "stdout" that set
the logfile to NULL, this always required some special handling.
2013-05-15 10:12:29 +02:00
antirez
9e74d216e1 CONFIG REWRITE: Use sane perms when creating redis.conf from scratch. 2013-05-14 12:45:04 +02:00
antirez
e252045454 CONFIG REWRITE: actually rewrite the config file, atomically. 2013-05-14 12:32:25 +02:00
antirez
25e049cc68 redis-cli: help.h updated. 2013-05-14 11:23:16 +02:00
antirez
78f94d90eb CONFIG REWRITE: remove orphaned lines. 2013-05-14 11:17:18 +02:00
antirez
ee721f1e5c CONFIG REWRITE: strip multiple empty lines. 2013-05-14 10:22:55 +02:00
antirez
c184f36d21 CONFIG REWRITE: support for client-output-buffer-limit. 2013-05-13 18:34:18 +02:00
antirez
d95592b116 CONFIG REWRITE: support for dir and slaveof. 2013-05-13 11:26:49 +02:00
antirez
2bc31e55ee CONFIG REWRITE: support for save and syslog-facility. 2013-05-13 11:11:45 +02:00
antirez
7e049fafd3 CONFIG REWRITE: Initial support code and design. 2013-05-13 11:11:12 +02:00
antirez
5947f170f9 Obtain absoute path of configuration file, expose it in INFO. 2013-05-09 16:57:59 +02:00
antirez
e938575220 Test: more PSYNC tests (backlog TTL). 2013-05-09 12:52:04 +02:00
antirez
a7486a6592 Version bumped to 2.9.10 2013-05-08 15:24:40 +02:00
antirez
16f2c3ea14 Test: check that replication partial sync works if we break the link.
The test checks both successful syncs and unsuccessful ones by changing
the backlog size.
2013-05-08 13:01:44 +02:00
antirez
c87dd0fe49 Test: various issues with the replication-4.tcl test fixed.
The test actually worked, but vars for master and slave were inverted
and sometimes used incorrectly.
2013-05-08 11:58:26 +02:00
antirez
0ae1b5b0a1 Revert "use long long instead of size_t make it more safe"
This reverts commit 2c75f2cf1a.

After further analysis, it is very unlikely that we'll raise the
string size limit to > 512MB, and at the same time such big strings
will be used in 32 bit systems.

Better to revert to size_t so that 32 bit processors will not be
forced to use a 64 bit counter in normal operations, that is currently
completely useless.
2013-05-08 10:01:27 +02:00
Salvatore Sanfilippo
c1ae7d2377 Merge pull request #1093 from july2993/unstable
in 32bit machine, popcount don't work with a input string length up to 5...
2013-05-08 00:49:33 -07:00
antirez
5885a34b67 Added more info about 32 bit builds into README. 2013-05-08 09:48:38 +02:00
Jiahao Huang
2c75f2cf1a use long long instead of size_t make it more safe 2013-05-07 23:37:22 +08:00
Jiahao Huang
e3ed78d43b in 32bit machine, popcount don't work with a input string length up to 512 MB,
bitcount commant may return negtive integer with string length more than 256 MB
2013-05-07 19:55:57 +08:00
antirez
5c9f6d4f55 Cluster: link reconnection on delayed PONG reply.
When the PONG delay is half the cluster node timeout, the link gets
disconnected (and later automatically reconnected) in order to ensure
that it's not just a dead connection issue.

However this operation is only performed if the link is old enough, in
order to avoid to disconnect the same link again and again (and among
the other problems, never receive the PONG because of that).

Note: when the link is reconnected, the 'ping_sent' field is not updated
even if a new ping is sent using the new connection, so we can still
reliably detect a node ping timeout.
2013-05-03 15:43:03 +02:00
antirez
1315b9f246 Cluster: restore PING sent time on reconnections. 2013-05-03 15:42:59 +02:00
antirez
ae71731019 Cluster: PING/PONG handling redesigned. 2013-05-03 15:42:38 +02:00