5644 Commits

Author SHA1 Message Date
antirez
82c68fa048 Add regression test for HINCRBYFLOAT formatting change.
This test was kindly provided by Jan-Erik Rediger (@badboy here on
Github) that discovered the issue.

See issue #2846.
2015-11-04 17:02:34 +01:00
Salvatore Sanfilippo
17e92993f4 Merge pull request #2850 from Joe8Bit/fix_typo-in-readme
Fix typo in READme sever/server
2015-11-04 12:59:11 +01:00
antirez
2008907cdc README new internals section improved a bit more. 2015-11-04 12:58:26 +01:00
Joe Pettersson
0817d61999 Fix typo in READme sever/server 2015-11-04 11:54:50 +00:00
antirez
aeef405429 README: remove garbage at end of line. 2015-11-04 12:52:37 +01:00
antirez
1a51974893 README operations -> commands, is more clear now #2. 2015-11-04 12:51:45 +01:00
antirez
27d408520f README operations -> commands, is more clear now. 2015-11-04 12:50:32 +01:00
antirez
f1fd00c0b0 A few README typos fixed #2. 2015-11-04 12:44:36 +01:00
antirez
1c06ecf39f A few README typos fixed. 2015-11-04 12:41:54 +01:00
antirez
ffab6563aa README now has info about Redis codebase layout. 2015-11-04 12:29:54 +01:00
Jan-Erik Rediger
5ce9e495c7 Remove printf 2015-11-04 11:48:14 +01:00
antirez
04278a276a Test: improve PFCOUNT with multiple keys testing.
An user raised a question about a given behavior of PFCOUNT. Added a
test to show the behavior (union) is correct when most of the items are
in common.
2015-11-03 19:03:17 +01:00
antirez
fdfaec8be3 Dependencies updated. 2015-10-30 12:15:07 +01:00
antirez
dbebe3b4cd Scripting: commands replication tests. 2015-10-30 12:06:09 +01:00
antirez
3af78260ff More reliable DEBUG loadaof.
Make sure to flush the AOF output buffers before reloading.
Result: less false timing related false positives on AOF tests.
2015-10-30 12:06:09 +01:00
antirez
65ca281273 Scripting: execute tests with command replication as well. 2015-10-30 12:06:09 +01:00
antirez
169e86f9b1 Scripting: ability to turn on Lua commands style replication globally.
Currently this feature is only accessible via DEBUG for testing, since
otherwise depending on the instance configuration a given script works
or is broken, which is against the Redis philosophy.
2015-10-30 12:06:09 +01:00
antirez
eca9dc7b3d Scripting: test Redis provided Lua functions error reporting. 2015-10-30 12:06:09 +01:00
antirez
80649e09d1 Scripting: fix error reporting of many Redis provided functions. 2015-10-30 12:06:09 +01:00
antirez
721f612918 Fix call() FORCE_REPL/AOF flags setting.
This commit also inverts two stanzas of the code just becuase they are
more logical like that, not because currently it makes any difference.
2015-10-30 12:06:08 +01:00
antirez
7d05c2d795 Lua script selective replication fixes. 2015-10-30 12:06:08 +01:00
antirez
d8e5f64638 Lua script selective replication WIP. 2015-10-30 12:06:08 +01:00
antirez
24103bafd0 Scripting: single commands replication mode implemented.
By calling redis.replicate_commands(), the scripting engine of Redis
switches to commands replication instead of replicating whole scripts.
This is useful when the script execution is costly but only results in a
few writes performed to the dataset.

Morover, in this mode, it is possible to call functions with side
effects freely, since the script execution does not need to be
deterministic: anyway we'll capture the outcome from the point of view
of changes to the dataset.

In this mode math.random() returns different sequences at every call.

If redis.replicate_commnads() is not called before any other write, the
command returns false and sticks to whole scripts replication instead.
2015-10-30 12:06:08 +01:00
antirez
52b4464ed6 call(): selective ability to prevent propagation on AOF / slaves. 2015-10-30 12:06:08 +01:00
antirez
78d342ec30 call(): don't inherit CLIENT_PREVENT_PROP + minor refactoring. 2015-10-30 12:06:08 +01:00
antirez
748928c596 CONTRIBUTING updated. 2015-10-27 12:06:26 +01:00
antirez
63988c9026 CLIENT REPLY command implemented: ON, OFF and SKIP modes.
Sometimes it can be useful for clients to completely disable replies
from the Redis server. For example when the client sends fire and forget
commands or performs a mass loading of data, or in caching contexts
where new data is streamed constantly. In such contexts to use server
time and bandwidth in order to send back replies to clients, which are
going to be ignored, is a shame.

Multiple mechanisms are possible to implement such a feature. For
example it could be a feature of MULTI/EXEC, or a command prefix
such as "NOREPLY SADD myset foo", or a different mechanism that allows
to switch on/off requests using the CLIENT command.

The MULTI/EXEC approach has the problem that transactions are not
strictly part of the no-reply semantics, and if we want to insert a lot
of data in a bulk way, creating a huge MULTI/EXEC transaction in the
server memory is bad.

The prefix is the best in this specific use case since it does not allow
desynchronizations, and is pretty clear semantically. However Redis
internals and client libraries are not prepared to handle this
currently.

So the implementation uses the CLIENT command, providing a new REPLY
subcommand with three options:

    CLIENT REPLY OFF disables the replies, and does not reply itself.
    CLIENT REPLY ON re-enables the replies, replying +OK.
    CLIENT REPLY SKIP only discards the reply of the next command, and
                      like OFF does not reply anything itself.

The reason to add the SKIP command is that it allows to have an easy
way to send conceptually "single" commands that don't need a reply
as the sum of two pipelined commands:

    CLIENT REPLY SKIP
    SET key value

Note that CLIENT REPLY ON replies with +OK so it should be used when
sending multiple commands that don't need a reply. However since it
replies with +OK the client can check that the connection is still
active and all the previous commands were received.

This is currently just into Redis "unstable" so the proposal can be
modified or abandoned based on users inputs.
2015-10-21 20:43:37 +02:00
Salvatore Sanfilippo
e209b1fde3 Merge pull request #2810 from dwlt/add-copy-replace-parameters-to-redis-trib-import
Add copy & replace parameters to redis-trib import
2015-10-15 13:02:35 +02:00
antirez
0e2eb8234e Redis.conf example: make clear user must pass its path as argument. 2015-10-15 12:46:07 +02:00
antirez
70cd161879 Regression test for issue #2813. 2015-10-15 11:23:15 +02:00
antirez
0c9c68346c PR 2813 fix ported to unstable. 2015-10-15 10:20:09 +02:00
David Thomson
80d1a5c065 Add back blank line 2015-10-14 06:58:36 +01:00
David Thomson
1361b951cd Update import command to optionally use copy and replace parameters 2015-10-14 06:56:14 +01:00
antirez
9fc48ed151 DEBUG RESTART/CRASH-AND-RECOVER [delay] implemented. 2015-10-13 11:12:25 +02:00
antirez
5b7bd883e6 Server: restartServer() API.
This new function is able to restart the server "in place". The current
Redis process executes the same executable it was executed with, using
the same arguments and configuration file.
2015-10-13 11:02:35 +02:00
antirez
33dedde038 Cluster: redis-trib fix, coverage for migrating=1 case.
Kinda related to #2770.
2015-10-09 16:15:58 +02:00
antirez
6a3e201234 Test: basic lazyfree unit test. 2015-10-09 09:47:17 +02:00
antirez
c3dbfc8825 Test: fix attach_to_replication_stream to handle newlines. 2015-10-07 22:32:24 +02:00
antirez
246b02eebe Fix extractLongLatOrReply() sanity check conditionals.
the check for lat/long valid ranges were performed inside the for loop,
two times instead of one, and the first time when the second element of
the array, xy[1], was yet not populated. This resulted into issue #2799.

Close issue #2799.
2015-10-07 22:27:18 +02:00
antirez
61cceef3a3 Jemalloc configure script fixed to work nested.
Now way to make unmodified Jemalloc configure to work when the jemalloc
source tree is inside a subdirectory of a different git repository.

Problem signaled here:
http://www.canonware.com/pipermail/jemalloc-discuss/2015-October/001174.html
2015-10-07 09:17:06 +02:00
antirez
e7e83e86f2 Jemalloc updated to 4.0.3. 2015-10-06 16:55:37 +02:00
antirez
fe49700cf5 Added a README into deps on dependencies and how to upgrade. 2015-10-06 10:56:16 +02:00
antirez
dc5b467b17 Regression test for GEORADIUS COUNT arity check. 2015-10-06 09:27:29 +02:00
antirez
ea9586b9e0 Fix GEORADIUS COUNT option arity checks. 2015-10-06 09:25:28 +02:00
antirez
97df261503 Lazyfree options documented in the example redis.conf. 2015-10-05 12:24:16 +02:00
antirez
6432b8a4d1 Lazyfree options implemented in the configuration. 2015-10-05 12:11:27 +02:00
antirez
27ec5105eb Lazyfree: cond vars to enabled/disable it based on DEL context. 2015-10-02 15:27:57 +02:00
antirez
714b06d5fa Fixed a bug in the emptyDb() new implementation. 2015-10-01 13:02:26 +02:00
antirez
93da3c7874 FLUSHDB and FLUSHALL ASYNC option implemented. 2015-10-01 13:02:26 +02:00
antirez
da103b45ed Lazyfree: pending objects count in INFO output. 2015-10-01 13:02:26 +02:00