4029 Commits

Author SHA1 Message Date
antirez
e82ec2c5d8 Diskless replication: child writes report to parent. 2014-10-29 14:33:49 +01:00
antirez
2ed67e4a9e rio.c fdset target: tolerate (and report) a subset of FDs in error.
Fdset target is used when we want to write an RDB file directly to
slave's sockets. In this setup as long as there is a single slave that
is still receiving our payload, we want to continue sennding instead of
aborting. However rio calls should abort of no FD is ok.

Also we want the errors reported so that we can signal the parent who is
ok and who is broken, so there is a new set integers with the state of
each fd. Zero is ok, non-zero is the errno of the failure, if avaialble,
or a generic EIO.
2014-10-29 14:33:49 +01:00
antirez
51864fcdd7 Diskless replication: parent-child pipe and a few TODOs. 2014-10-29 14:33:49 +01:00
antirez
1b4cadb664 Diskless replication: RDB -> slaves transfer draft implementation. 2014-10-29 14:33:49 +01:00
antirez
38dee9dc51 rio.c: draft implementation of fdset target implemented. 2014-10-29 14:33:49 +01:00
antirez
5d295fea12 rio.c refactoring before adding a new target. 2014-10-29 14:33:49 +01:00
antirez
aef4c60c78 Add some comments in syncCommand() to clarify RDB target. 2014-10-29 14:33:49 +01:00
antirez
81abd1e178 Define different types of RDB childs.
We need to remember what is the saving strategy of the current RDB child
process, since the configuration may be modified at runtime via CONFIG
SET and still we'll need to understand, when the child exists, what to
do and for what goal the process was initiated: to create an RDB file
on disk or to write stuff directly to slave's sockets.
2014-10-29 14:33:49 +01:00
antirez
1e633f21c5 RDB file creation refactored to target non-disk target. 2014-10-29 14:33:49 +01:00
antirez
ff8a3baaf7 Replication: better way to send a preamble before RDB payload.
During the replication full resynchronization process, the RDB file is
transfered from the master to the slave. However there is a short
preamble to send, that is currently just the bulk payload length of the
file in the usual Redis form $..length..<CR><LF>.

This preamble used to be sent with a direct write call, assuming that
there was alway room in the socket output buffer to hold the few bytes
needed, however this does not scale in case we'll need to send more
stuff, and is not very robust code in general.

This commit introduces a more general mechanism to send a preamble up to
2GB in size (the max length of an sds string) in a non blocking way.
2014-10-29 14:33:30 +01:00
antirez
b6203138d3 Linenoise README updated to match source code. 2014-10-06 10:02:08 +02:00
Miguel Parramon
85b15acb44 redis.conf small grammar fix
😄

Closes #2034
2014-10-06 10:02:08 +02:00
Ezequiel Lovelle
09fc0fbbe4 Fix typo
Closes #2029
2014-10-06 10:02:08 +02:00
Gregory Petrosyan
03b36eef72 Fix typos in comments
Closes #2002
2014-10-06 10:01:36 +02:00
Matt Stancliff
e1ccd7243f Add missing 'by' 2014-10-06 10:01:36 +02:00
Juarez Bochi
364aeed96d Fix typo in scripting.c comment
Closes #1960
2014-10-06 10:01:36 +02:00
T.J. Schuck
a7a2f69bdb Fix typo radis -> redis
Closes #1938
2014-10-06 10:01:36 +02:00
Matt Stancliff
1adc4a7888 Cleanup wording of dictScan() comment
Some language in the comment was difficult
to understand, so this commit: clarifies wording, removes
unnecessary words, and relocates some dependent clauses
closer to what they actually describe.

I also tried to break up longer chains of thought
(if X, then Y, and Q, and also F, so obviously M)
into more manageable chunks for ease of understanding.
2014-10-06 10:01:36 +02:00
Matt Stancliff
c3375fbdff Remove trailing spaces from tests 2014-10-06 10:01:27 +02:00
Matt Stancliff
c4d32c03d0 Fix spelling in some test cases 2014-10-06 10:01:05 +02:00
Jan-Erik Rediger
919a4c3126 Fix sentinel.conf typo
Closes #1739
2014-10-06 10:00:48 +02:00
Xiaojie Zhang
8a1d16fe5c Fix comment inconsistencies in ziplist.c
Closes #1523
2014-10-06 10:00:48 +02:00
Matt Stancliff
e0ffc863c6 Clean up text throughout project
- 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
2014-10-06 10:00:43 +02:00
Matt Stancliff
22e6f434f8 Spell software correctly 2014-10-06 09:59:52 +02:00
Aaron Rutkovsky
3101760937 Fix typos
Closes #1513
2014-10-06 09:59:02 +02:00
Ben
d3005539c5 Grammar and typo fixes in redis.conf
Closes #1441
2014-10-06 09:58:56 +02:00
xuxiang
3c99e429cf Fix typo in redis.h
Closes #1386
2014-10-06 09:58:18 +02:00
Ted Nyman
55597bbd67 Fix on-place -> in-place
Closes #1373
2014-10-06 09:58:18 +02:00
Michael Parker
a5044c254d Fix hash table size in comment for dictScan
Closes #1351
2014-10-06 09:58:18 +02:00
Jan-Erik Rediger
33daf8e9a9 Fix many small typos
Closes #1871
2014-10-06 09:58:11 +02:00
zionwu
b72422e100 Fix incorrect comments
error != success; and 0 != number of bytes written

Closes #1806
2014-10-06 09:57:01 +02:00
Jan-Erik Rediger
6cdd38f947 Fix typo in redis.conf
Closes #1713
2014-10-06 09:57:01 +02:00
Juarez Bochi
6b64fa49f8 Fix typo
Closes #1682
2014-10-06 09:57:01 +02:00
Agis Anastasopoulos
fc9bce45c5 Fix typo
Closes #1544
2014-10-06 09:57:01 +02:00
Jan-Erik Rediger
575e293ddd Fix typo: ad -> and
Closes #1537
2014-10-06 09:57:01 +02:00
Matt Stancliff
d05fcaffa0 Update linenoise accessory files
The core linenoise code was being backported, but not
the README or example.  It's less confusing for users
if everything matches across directories.

Fix inspired by @thrig

Closes #1872
2014-10-06 09:57:01 +02:00
Manuel Meurer
a99d187bc4 Improve disable save comment in redis.conf
Closes #1897
2014-10-06 09:57:01 +02:00
Lynn
904bd0400c Remove surplus double quotes
Closes #1877
2014-10-06 09:57:01 +02:00
antirez
04b6945ebc Linenoise lib updated. 2014-09-22 14:56:01 +02:00
antirez
ade6c5e782 Redis 2.8.17 2.8.17 2014-09-19 17:49:16 +02:00
Matt Stancliff
cf143b571e Fix hiredis getaddrinfo leak
Fixed in Redis by 1a5e5b6, but since that part of code
is largely copy/paste from Redis, the fix needs to be
ported over too.

Closes #2012
2014-09-19 14:21:36 +02:00
antirez
a69534967b Redis 2.8.16. 2.8.16 2014-09-16 15:15:56 +02:00
antirez
5e38bc389c Better truncated AOF loading tests.
Now there are tests to write more data after loading a truncated AOF,
testing that the loaded data is correct, appending more, and testing
again.
2014-09-16 11:05:50 +02:00
antirez
01f7db608d Seek at the end of AOF after truncate call.
It is not clear if files open in append only mode will automatically fix
their offset after a truncate(2) operation. This commit makes sure that
we reposition the AOF file descriptor offset at the end of the file
after a truncated AOF is loaded and trimmed to the last valid command.
2014-09-16 11:05:50 +02:00
antirez
9faeff0215 On AOF end of file, truncate the AOF to last valid command.
Recently we introduced the ability to load truncated AOFs, but
unfortuantely the support was broken since the server, after loading the
truncated AOF, continues appending to the file that is corrupted at the
end. The problem is fixed only in the next AOF rewrite.

This commit fixes the issue by truncating the AOF to the last valid
opcode, and aborting if it is not possible to truncate the file
correctly.
2014-09-16 10:41:15 +02:00
antirez
fbd9dc6039 Don't propagate SAVE.
This is a general fix (check that dirty delta is positive) but actually
should have as the only effect fixing the SAVE propagation to
AOF and slaves.
2014-09-16 10:41:15 +02:00
antirez
551ffc486c version.h updated to 2.8.15. 2.8.15 2014-09-12 16:16:58 +02:00
antirez
78dca8977f Redis 2.8.15. 2014-09-12 16:15:48 +02:00
antirez
a6695e341b Sentinel sentinelGetLeader() top comment improved. 2014-09-11 19:28:10 +02:00
antirez
9fe4429a09 Sentinel: fix computation of total number of votes.
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).
2014-09-11 19:28:09 +02:00