summaryrefslogtreecommitdiff
path: root/src/scripting.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-10-29 15:57:41 +0100
committerantirez <antirez@gmail.com>2015-10-30 12:06:08 +0100
commit514a23472262de499005a31b1af3cca08a1c84ba (patch)
tree1473ceca0379da22c95d8a73784d420808cd5362 /src/scripting.c
parenta3e8de043005f0e764f6506d1e38143d788cddc4 (diff)
downloadredis-514a23472262de499005a31b1af3cca08a1c84ba.tar.gz
Lua script selective replication fixes.
Diffstat (limited to 'src/scripting.c')
-rw-r--r--src/scripting.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/scripting.c b/src/scripting.c
index 10e939f34..3ae25152f 100644
--- a/src/scripting.c
+++ b/src/scripting.c
@@ -385,11 +385,11 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
/* Run the command */
int call_flags = CMD_CALL_SLOWLOG | CMD_CALL_STATS;
if (server.lua_replicate_commands) {
- call_flags |= CMD_CALL_PROPAGATE;
- /* Don't propagate AOf / replication stream if a redis.set_repl()
- * call changed the default replication policy. */
- if (!(server.lua_repl & PROPAGATE_AOF)) preventCommandAOF(c);
- if (!(server.lua_repl & PROPAGATE_REPL)) preventCommandReplication(c);
+ /* Set flags according to redis.set_repl() settings. */
+ if (server.lua_repl & PROPAGATE_AOF)
+ call_flags |= CMD_CALL_PROPAGATE_AOF;
+ if (server.lua_repl & PROPAGATE_REPL)
+ call_flags |= CMD_CALL_PROPAGATE_REPL;
}
call(c,call_flags);