if ((server.rdb_compression = yesnotoi(argv[1])) == -1) {
err = "argument must be 'yes' or 'no'"; goto loaderr;
}
+ } else if (!strcasecmp(argv[0],"rdbchecksum") && argc == 2) {
+ if ((server.rdb_checksum = yesnotoi(argv[1])) == -1) {
+ err = "argument must be 'yes' or 'no'"; goto loaderr;
+ }
} else if (!strcasecmp(argv[0],"activerehashing") && argc == 2) {
if ((server.activerehashing = yesnotoi(argv[1])) == -1) {
err = "argument must be 'yes' or 'no'"; goto loaderr;
}
} 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-protect-globals") && argc == 2) {
+ if ((server.lua_protect_globals = yesnotoi(argv[1])) == -1) {
+ err = "argument must be 'yes' or 'no'"; goto loaderr;
+ }
} else if (!strcasecmp(argv[0],"slowlog-log-slower-than") &&
argc == 2)
{
} else if (!strcasecmp(c->argv[2]->ptr,"lua-time-limit")) {
if (getLongLongFromObject(o,&ll) == REDIS_ERR || ll < 0) goto badfmt;
server.lua_time_limit = ll;
+ } else if (!strcasecmp(c->argv[2]->ptr,"lua-protect-globals")) {
+ int enable = yesnotoi(o->ptr);
+
+ if (enable == -1) goto badfmt;
+ if (enable == 0 && server.lua_protect_globals == 1) {
+ scriptingDisableGlobalsProtection(server.lua);
+ } else if (enable && server.lua_protect_globals == 0) {
+ scriptingEnableGlobalsProtection(server.lua);
+ }
+ server.lua_protect_globals = enable;
} else if (!strcasecmp(c->argv[2]->ptr,"slowlog-log-slower-than")) {
if (getLongLongFromObject(o,&ll) == REDIS_ERR) goto badfmt;
server.slowlog_log_slower_than = ll;
} else if (!strcasecmp(c->argv[2]->ptr,"repl-timeout")) {
if (getLongLongFromObject(o,&ll) == REDIS_ERR || ll <= 0) goto badfmt;
server.repl_timeout = ll;
+ } else if (!strcasecmp(c->argv[2]->ptr,"watchdog-period")) {
+ if (getLongLongFromObject(o,&ll) == REDIS_ERR || ll < 0) goto badfmt;
+ if (ll)
+ enableWatchdog(ll);
+ else
+ disableWatchdog();
+ } else if (!strcasecmp(c->argv[2]->ptr,"rdbcompression")) {
+ int yn = yesnotoi(o->ptr);
+
+ if (yn == -1) goto badfmt;
+ server.rdb_compression = yn;
+ } else if (!strcasecmp(c->argv[2]->ptr,"rdbchecksum")) {
+ int yn = yesnotoi(o->ptr);
+
+ if (yn == -1) goto badfmt;
+ server.rdb_checksum = yn;
} else {
addReplyErrorFormat(c,"Unsupported CONFIG parameter: %s",
(char*)c->argv[2]->ptr);
config_get_numerical_field("repl-ping-slave-period",server.repl_ping_slave_period);
config_get_numerical_field("repl-timeout",server.repl_timeout);
config_get_numerical_field("maxclients",server.maxclients);
+ config_get_numerical_field("watchdog-period",server.watchdog_period);
/* Bool (yes/no) values */
config_get_bool_field("no-appendfsync-on-rewrite",
server.stop_writes_on_bgsave_err);
config_get_bool_field("daemonize", server.daemonize);
config_get_bool_field("rdbcompression", server.rdb_compression);
+ config_get_bool_field("rdbchecksum", server.rdb_checksum);
config_get_bool_field("activerehashing", server.activerehashing);
+ config_get_bool_field("lua-protect-globals", server.lua_protect_globals);
/* Everything we can't handle with macros follows. */
server.stat_numcommands = 0;
server.stat_numconnections = 0;
server.stat_expiredkeys = 0;
+ server.stat_rejected_conn = 0;
+ server.stat_fork_time = 0;
+ server.aof_delayed_fsync = 0;
resetCommandTableStats();
addReply(c,shared.ok);
} else {