29 Commits

Author SHA1 Message Date
antirez
1236471b7b Fix MIGRATE entry in command table.
Thanks to Oran Agra (@oranagra) for reporting. Key extraction would not
work otherwise and it does not make sense to take wrong data in the
command table.
2015-11-17 15:35:42 +01:00
antirez
828a87ba32 call() deserves a good top-comment. 2015-11-10 13:31:36 +01:00
antirez
f069589ef4 Best effort flush of slave buffers before SHUTDOWN. 2015-11-09 17:27:41 +01:00
antirez
37109d8aac Fix error reply in subscribed Pub/Sub mode.
PING is now a valid command to issue in this context.
2015-11-09 11:12:28 +01:00
antirez
d6c24ff668 Initialize all Lua scripting related things into scripting.c 2015-11-05 11:37:36 +01:00
antirez
8695d96024 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:08:58 +01:00
antirez
e9d2329c8e 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:08:20 +01:00
antirez
dfe7f79708 Lua script selective replication fixes. 2015-10-30 12:08:20 +01:00
antirez
cbbfaf6ad3 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:08:20 +01:00
antirez
24cf0f6dcd call(): selective ability to prevent propagation on AOF / slaves. 2015-10-30 12:08:20 +01:00
antirez
0259da8c30 call(): don't inherit CLIENT_PREVENT_PROP + minor refactoring. 2015-10-30 12:08:20 +01:00
antirez
fcb3aef7c4 DEBUG RESTART/CRASH-AND-RECOVER [delay] implemented. 2015-10-15 10:21:33 +02:00
antirez
1db84c21b4 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-15 10:21:33 +02:00
antirez
838833cd32 Move handleClientsWithPendingWrites() in networking.c. 2015-10-01 11:39:13 +02:00
antirez
23e7710c28 Avoid installing the client write handler when possible. 2015-10-01 11:39:13 +02:00
antirez
4bc42ca7f6 checkTcpBacklogSetting() now called in Sentinel mode too. 2015-07-29 12:13:20 +02:00
antirez
e6f39338e6 CLIENT_MASTER introduced. 2015-07-28 16:58:35 +02:00
antirez
54c71f2d96 RDMF: Redis -> Server in adjustOpenFilesLimit(). 2015-07-28 11:19:20 +02:00
antirez
813ff7fdde Avoid magic "0" argument to prepareForShutdown().
Backported from Disque.
2015-07-28 11:10:42 +02:00
antirez
5cfb792777 RDMF: dictRedisObjectDestructor -> dictObjectDestructor." 2015-07-28 11:03:01 +02:00
antirez
a83e79b176 Use mstime_t as return value of mstime(). 2015-07-28 10:14:33 +02:00
antirez
3325a9b11f RDMF: more names updated. 2015-07-27 15:03:10 +02:00
antirez
32f80e2f1b RDMF: More consistent define names. 2015-07-27 14:37:58 +02:00
antirez
40eb548a80 RDMF: REDIS_OK REDIS_ERR -> C_OK C_ERR. 2015-07-26 23:17:55 +02:00
antirez
2d9e3eb107 RDMF: redisAssert -> serverAssert. 2015-07-26 15:29:53 +02:00
antirez
14ff572482 RDMF: OBJ_ macros for object related stuff. 2015-07-26 15:28:00 +02:00
antirez
554bd0e7bd RDMF: use client instead of redisClient, like Disque. 2015-07-26 15:20:52 +02:00
antirez
424fe9afd9 RDMF: redisLog -> serverLog. 2015-07-26 15:17:43 +02:00
antirez
cef054e868 RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00