Commit Graph

4172 Commits

Author SHA1 Message Date
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
1e633f21c5 RDB file creation refactored to target non-disk target. 2014-10-29 14:33:49 +01:00
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
b6203138d3 Linenoise README updated to match source code. 2014-10-06 10:02:08 +02:00
85b15acb44 redis.conf small grammar fix
😄

Closes #2034
2014-10-06 10:02:08 +02:00
09fc0fbbe4 Fix typo
Closes #2029
2014-10-06 10:02:08 +02:00
03b36eef72 Fix typos in comments
Closes #2002
2014-10-06 10:01:36 +02:00
e1ccd7243f Add missing 'by' 2014-10-06 10:01:36 +02:00
364aeed96d Fix typo in scripting.c comment
Closes #1960
2014-10-06 10:01:36 +02:00
a7a2f69bdb Fix typo radis -> redis
Closes #1938
2014-10-06 10:01:36 +02:00
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
c3375fbdff Remove trailing spaces from tests 2014-10-06 10:01:27 +02:00
c4d32c03d0 Fix spelling in some test cases 2014-10-06 10:01:05 +02:00
919a4c3126 Fix sentinel.conf typo
Closes #1739
2014-10-06 10:00:48 +02:00
8a1d16fe5c Fix comment inconsistencies in ziplist.c
Closes #1523
2014-10-06 10:00:48 +02:00
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
22e6f434f8 Spell software correctly 2014-10-06 09:59:52 +02:00
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
3c99e429cf Fix typo in redis.h
Closes #1386
2014-10-06 09:58:18 +02:00
55597bbd67 Fix on-place -> in-place
Closes #1373
2014-10-06 09:58:18 +02:00
a5044c254d Fix hash table size in comment for dictScan
Closes #1351
2014-10-06 09:58:18 +02:00
33daf8e9a9 Fix many small typos
Closes #1871
2014-10-06 09:58:11 +02:00
b72422e100 Fix incorrect comments
error != success; and 0 != number of bytes written

Closes #1806
2014-10-06 09:57:01 +02:00
6cdd38f947 Fix typo in redis.conf
Closes #1713
2014-10-06 09:57:01 +02:00
6b64fa49f8 Fix typo
Closes #1682
2014-10-06 09:57:01 +02:00
fc9bce45c5 Fix typo
Closes #1544
2014-10-06 09:57:01 +02:00
575e293ddd Fix typo: ad -> and
Closes #1537
2014-10-06 09:57:01 +02:00
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
a99d187bc4 Improve disable save comment in redis.conf
Closes #1897
2014-10-06 09:57:01 +02:00
904bd0400c Remove surplus double quotes
Closes #1877
2014-10-06 09:57:01 +02:00
04b6945ebc Linenoise lib updated. 2014-09-22 14:56:01 +02:00
ade6c5e782 Redis 2.8.17 2.8.17 2014-09-19 17:49:16 +02:00
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
a69534967b Redis 2.8.16. 2.8.16 2014-09-16 15:15:56 +02:00
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
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
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
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
551ffc486c version.h updated to 2.8.15. 2.8.15 2014-09-12 16:16:58 +02:00
78dca8977f Redis 2.8.15. 2014-09-12 16:15:48 +02:00
a6695e341b Sentinel sentinelGetLeader() top comment improved. 2014-09-11 19:28:10 +02:00
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
6fbcb19275 luaRedisGenericCommand() cached argv handling simplified.
As discussed in issue #1945.
2014-09-10 15:47:02 +02:00
8375a6d0aa Limit the *SCAN command dictScan iterations
*SCAN will cause redis server to hang for seconds
after millions of keys was deleted by SCAN/DEL pairs
2014-09-10 09:58:20 +02:00
55024e9a9a Sentinel: don't set announce-ip if is empty. 2014-09-10 09:26:29 +02:00
3cc31da349 Sentinel: clarify announce-ip/port options in sentinel.conf. 2014-09-10 09:26:29 +02:00
8c3507aa8f Sentinel: announce ip/port changes + rewrite.
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.
2014-09-10 09:26:29 +02:00
9f3abf436b sentinel: Decouple bind address from address sent to other sentinels
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
2014-09-10 09:26:29 +02:00
ff47d5ebf6 Tests for aof-load-truncated = yes. 2014-09-08 10:58:00 +02:00