Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
86147afd
Commit
86147afd
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
449ec38f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
86147afd
...
@@ -269,6 +269,7 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
...
@@ -269,6 +269,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