antirez
4a6701d7ec
pqsort.c: remove the "switch to insertion sort" optimization.
...
It causes catastrophic performance for certain inputs.
Relevant NetBSD commit:
http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdlib/qsort.c?rev=1.20&content-type=text/x-cvsweb-markup&only_with_tag=MAIN
This fixes issue #968 .
2013-07-02 17:47:32 +02:00
Salvatore Sanfilippo
10aca2ba76
Merge pull request #776 from charsyam/ziplist-bug
...
fix randstring bug in ziplist.c
2013-07-02 03:18:18 -07:00
antirez
37b5ec9425
Only allow basenames for dbfilename and appendfilename.
...
This fixes issue #1094 .
2013-07-02 12:14:28 +02:00
antirez
0726c25900
pathIsBaseName() added to utils.c
...
The function is used to test that the specified string looks like just
as the basename of a path, without any absolute or relative path.
2013-07-02 12:08:07 +02:00
antirez
f57a871de0
getAbsolutePath() moved into utils.c
2013-07-02 11:56:52 +02:00
antirez
f4805fa45a
CONFIG SET maxclients.
2013-06-28 17:08:03 +02:00
antirez
9281336e6b
ae.c event loop: API to resize the fd set size on the run.
2013-06-28 16:39:49 +02:00
antirez
e94b5b9359
Allow SHUTDOWN in loading state.
2013-06-27 12:18:29 +02:00
antirez
1065918c36
function renamed: popcount_binary -> redisPopcount.
2013-06-26 15:19:06 +02:00
Salvatore Sanfilippo
a59318f0a4
Merge pull request #1111 from yamt/netbsd3
...
netbsd support
2013-06-26 06:17:02 -07:00
antirez
cdaacf03aa
Don't disconnect pre PSYNC replication clients for timeout.
...
Clients using SYNC to replicate are older implementations, such as
redis-cli --slave, and are not designed to acknowledge the master with
REPLCONF ACK commands, so we don't have any feedback and should not
disconnect them on timeout.
2013-06-26 10:11:20 +02:00
antirez
600567383a
Test: add some AOF testing to EVALSHA replication test.
2013-06-25 15:49:07 +02:00
antirez
e9f50cb1a1
Flush the replication script cache after SCRIPT FLUSH.
2013-06-25 15:36:48 +02:00
antirez
1ff422dc47
Test: EVALSHA replication.
2013-06-25 15:35:48 +02:00
antirez
31f34595c6
Test: randomInt() behavior commented.
2013-06-25 15:32:37 +02:00
antirez
c43286e5a9
Test: replication-3 test speedup in master-slave setup.
2013-06-25 15:13:14 +02:00
antirez
32b465b998
Force propagation of SCRIPT LOAD to AOF.
2013-06-25 12:49:56 +02:00
antirez
a4a60080b7
SCRIPT FLUSH comment minor pedantic improvement.
2013-06-25 10:56:59 +02:00
antirez
8338e50127
Move Replication Script Cache initialization in safer place.
...
It should be called just one time at startup and not every time the Lua
scripting engine is re-initialized, otherwise memory is leaked.
2013-06-24 19:27:49 +02:00
antirez
eaebabe564
Use the RSC to replicate EVALSHA unmodified.
...
This commit uses the Replication Script Cache in order to avoid
translating EVALSHA into EVAL whenever possible for both the AOF and
slaves.
2013-06-24 18:57:31 +02:00
antirez
a9e1c46f40
Replication of scripts as EVALSHA: sha1 caching implemented.
...
This code is only responsible to take an LRU-evicted fixed length cache
of SHA1 that we are sure all the slaves received.
In this commit only the implementation is provided, but the Redis core
does not use it to actually send EVALSHA to slaves when possible.
2013-06-24 10:26:04 +02:00
antirez
08dff9fb66
New API to force propagation.
...
The old REDIS_CMD_FORCE_REPLICATION flag was removed from the
implementation of Redis, now there is a new API to force specific
executions of a command to be propagated to AOF / Replication link:
void forceCommandPropagation(int flags);
The new API is also compatible with Lua scripting, so a script that will
execute commands that are forced to be propagated, will also be
propagated itself accordingly even if no change to data is operated.
As a side effect, this new design fixes the issue with scripts not able
to propagate PUBLISH to slaves (issue #873 ).
2013-06-21 12:07:53 +02:00
Salvatore Sanfilippo
e73548b0ee
Merge pull request #1167 from badboy/patch-1
...
Initialize char* to NULL to remove compiler warning
2013-06-20 07:56:31 -07:00
Jan-Erik Rediger
21afa5dbed
Initialize char* to NULL to remove compiler warning
2013-06-20 17:53:35 +03:00
antirez
c0a47ea63c
Allow PUBSUB NUMSUB without channels.
...
The result is an empty list but it is handy to call it programmatically.
2013-06-20 15:34:56 +02:00
antirez
d337302b90
PUBSUB command implemented.
...
Currently it implements three subcommands:
PUBSUB CHANNELS [<pattern>] List channels with non-zero subscribers.
PUBSUB NUMSUB [channel_1 ...] List number of subscribers for channels.
PUBSUB NUMPAT Return number of subscribed patterns.
2013-06-20 15:32:00 +02:00
antirez
8b49716f0d
Sentinel: parse new INFO replication output correctly.
...
Sentinel was not able to detect slaves when connected to a very recent
version of Redis master since a previos non-backward compatible change
to INFO broken the parsing of the slaves ip:port INFO output.
This fixes issue #1164
2013-06-20 10:23:23 +02:00
antirez
5f770dcc2f
Test: regression test for #1163 .
2013-06-19 18:53:07 +02:00
antirez
96574ee610
Fix comment typo in integration/aof.tcl.
2013-06-19 18:31:33 +02:00
antirez
f352985cc1
Allow writes from scripts called by AOF loading in read-only slaves.
...
This fixes issue #1163
2013-06-19 18:25:03 +02:00
antirez
f0861f0116
Fix logStackTrace() when logging to stdout.
...
When the semantics changed from logfile = NULL to logfile = "" to log
into standard output, no proper change was made to logStackTrace() to
make it able to work with the new setup.
This commit fixes the issue.
2013-06-19 14:44:40 +02:00
antirez
058541f3be
Lua script errors format more unified.
...
lua_pcall error handler now formats errors in a way more similar to
luaPushError() so that errors generated in different contexts look alike.
2013-06-18 19:30:56 +02:00
antirez
af2cadc4b7
Lua scripting: improve error reporting.
...
When calling Lua scripts we try to report not just the error but
information about the code line causing the error.
2013-06-18 17:33:35 +02:00
Salvatore Sanfilippo
8cf042f959
Merge pull request #1124 from ioddly/fix-issue-1121
...
Try to report source of bad Lua API calls
2013-06-17 03:14:31 -07:00
Salvatore Sanfilippo
3acb4acba8
Merge pull request #819 from Keruspe/unstable
...
test-server: only listen to 127.0.0.1
2013-06-17 03:08:14 -07:00
Marc-Antoine Perennou
f9eef102c8
test-server: only listen to 127.0.0.1
...
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2013-06-12 22:49:32 +02:00
antirez
811c5a2cdf
Cluster: detect nodes address change.
2013-06-12 10:50:07 -07:00
antirez
fffc5f809e
clusterProcessPacket() comments improved for correctness.
2013-06-11 21:34:34 +02:00
antirez
f62a4017b5
Binary safe dump of object content in redisLogObjectDebugInfo().
2013-06-04 15:53:53 +02:00
antirez
9aa989d073
CONFIG SET: accept slave-priority zero, it is valid.
2013-05-31 19:31:36 +02:00
antirez
650fc5218f
Test: avoid a false positive in min-slaves test.
2013-05-31 11:43:30 +02:00
antirez
89ec3e8b22
Tests added for min-slaves feature.
2013-05-30 18:54:28 +02:00
antirez
45ff68db75
Refresh good slaves count after CONFIG SET min-slaves-...
...
This way just after the CONFIG SET enabling the min-slaves feature it is
possible to write to the database without delays.
2013-05-30 12:23:41 +02:00
antirez
57984ee8f2
New INFO field "min_slaves_good_slaves".
...
When min-slaves-to-write feature is active, this field reports the
number of slaves considered good (online state, lag within the specified
range).
2013-05-30 12:18:31 +02:00
antirez
e802b22dfb
Refresh good slaves count when setting slave state as online.
2013-05-30 12:13:25 +02:00
antirez
376797e1b5
Make tests compatible with new INFO replication output.
2013-05-30 11:43:43 +02:00
antirez
b6e37a61c4
min-replicas-to-write: only deny write commands.
...
I guess I needed another coffee...
2013-05-30 11:30:09 +02:00
antirez
cb76f29230
min-slaves-to-write: don't accept writes with less than N replicas.
...
This feature allows the user to specify the minimum number of
connected replicas having a lag less or equal than the specified
amount of seconds for writes to be accepted.
2013-05-30 11:30:04 +02:00
antirez
78259af9ec
min-slaves-to-write: initial description of the feature in redis.conf
2013-05-30 11:29:58 +02:00
antirez
564d8c4c0b
repl_offset field in INFO replication is now just offset.
2013-05-29 19:56:33 +02:00