Skip to content
Permalink
Browse files
Use commands (effects) replication by default in scripts.
See issue #5250 and issue #5292 for more info.
  • Loading branch information
antirez committed Sep 5, 2018
1 parent 7e11825 commit 7895835df6aeb2a2d499bc499ae6cb340228908f
Showing 3 changed files with 8 additions and 1 deletion.
@@ -677,6 +677,8 @@ void loadServerConfigFromString(char *config) {
}
} else if (!strcasecmp(argv[0],"lua-time-limit") && argc == 2) {
server.lua_time_limit = strtoll(argv[1],NULL,10);
} else if (!strcasecmp(argv[0],"lua-replicate-commands") && argc == 2) {
Copy link
@soloestoy

soloestoy Sep 6, 2018

Contributor

no config get/set/rewrite ?

Copy link
@antirez

antirez Sep 6, 2018

Author Contributor

Nope... it's not even documented in redis.conf. The idea is to make it basically deprecated, even if we can roll-back in emergency.

server.lua_always_replicate_commands = yesnotoi(argv[1]);
} else if (!strcasecmp(argv[0],"slowlog-log-slower-than") &&
argc == 2)
{
@@ -917,7 +917,6 @@ void scriptingInit(int setup) {
server.lua_client = NULL;
server.lua_caller = NULL;
server.lua_timedout = 0;
server.lua_always_replicate_commands = 0; /* Only DEBUG can change it.*/
ldbInit();
}

@@ -1715,6 +1715,12 @@ void initServerConfig(void) {
server.assert_line = 0;
server.bug_report_start = 0;
server.watchdog_period = 0;

/* By default we want scripts to be always replicated by effects
* (single commands executed by the script), and not by sending the
* script to the slave / AOF. This is the new way starting from
* Redis 5. However it is possible to revert it via redis.conf. */
server.lua_always_replicate_commands = 1;
}

extern char **environ;

0 comments on commit 7895835

Please sign in to comment.