mirror of
https://github.com/fluencelabs/redis
synced 2025-06-16 18:51:20 +00:00
Lua script selective replication fixes.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user