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
8e63fd07
Commit
8e63fd07
authored
Jun 19, 2013
by
antirez
Browse files
Allow writes from scripts called by AOF loading in read-only slaves.
This fixes issue #1163
parent
a73da278
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
8e63fd07
...
@@ -258,6 +258,7 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
...
@@ -258,6 +258,7 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
"Write commands not allowed after non deterministic commands"
);
"Write commands not allowed after non deterministic commands"
);
goto
cleanup
;
goto
cleanup
;
}
else
if
(
server
.
masterhost
&&
server
.
repl_slave_ro
&&
}
else
if
(
server
.
masterhost
&&
server
.
repl_slave_ro
&&
!
server
.
loading
&&
!
(
server
.
lua_caller
->
flags
&
REDIS_MASTER
))
!
(
server
.
lua_caller
->
flags
&
REDIS_MASTER
))
{
{
luaPushError
(
lua
,
shared
.
roslaveerr
->
ptr
);
luaPushError
(
lua
,
shared
.
roslaveerr
->
ptr
);
...
...
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