Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
3e1fb5ff
Commit
3e1fb5ff
authored
Sep 05, 2018
by
antirez
Browse files
Use commands (effects) replication by default in scripts.
See issue #5250 and issue #5292 for more info.
parent
c6c71abe
Changes
3
Show whitespace changes
Inline
Side-by-side
src/config.c
View file @
3e1fb5ff
...
@@ -677,6 +677,8 @@ void loadServerConfigFromString(char *config) {
...
@@ -677,6 +677,8 @@ void loadServerConfigFromString(char *config) {
}
}
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"lua-time-limit"
)
&&
argc
==
2
)
{
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"lua-time-limit"
)
&&
argc
==
2
)
{
server
.
lua_time_limit
=
strtoll
(
argv
[
1
],
NULL
,
10
);
server
.
lua_time_limit
=
strtoll
(
argv
[
1
],
NULL
,
10
);
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"lua-replicate-commands"
)
&&
argc
==
2
)
{
server
.
lua_always_replicate_commands
=
yesnotoi
(
argv
[
1
]);
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"slowlog-log-slower-than"
)
&&
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"slowlog-log-slower-than"
)
&&
argc
==
2
)
argc
==
2
)
{
{
...
...
src/scripting.c
View file @
3e1fb5ff
...
@@ -917,7 +917,6 @@ void scriptingInit(int setup) {
...
@@ -917,7 +917,6 @@ void scriptingInit(int setup) {
server
.
lua_client
=
NULL
;
server
.
lua_client
=
NULL
;
server
.
lua_caller
=
NULL
;
server
.
lua_caller
=
NULL
;
server
.
lua_timedout
=
0
;
server
.
lua_timedout
=
0
;
server
.
lua_always_replicate_commands
=
0
;
/* Only DEBUG can change it.*/
ldbInit
();
ldbInit
();
}
}
...
...
src/server.c
View file @
3e1fb5ff
...
@@ -1715,6 +1715,12 @@ void initServerConfig(void) {
...
@@ -1715,6 +1715,12 @@ void initServerConfig(void) {
server
.
assert_line
=
0
;
server
.
assert_line
=
0
;
server
.
bug_report_start
=
0
;
server
.
bug_report_start
=
0
;
server
.
watchdog_period
=
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
;
extern
char
**
environ
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment