Commit f2739ca9 authored by antirez's avatar antirez
Browse files

After slave Lua script leaves busy state, re-process the master buffer.

Technically speaking we don't really need to put the master client in
the clients that need to be processed, since in practice the PING
commands from the master will take care, however it is conceptually more
sane to do so.
parent e8d35809
...@@ -827,8 +827,7 @@ void freeClient(client *c) { ...@@ -827,8 +827,7 @@ void freeClient(client *c) {
serverLog(LL_WARNING,"Connection with master lost."); serverLog(LL_WARNING,"Connection with master lost.");
if (!(c->flags & (CLIENT_CLOSE_AFTER_REPLY| if (!(c->flags & (CLIENT_CLOSE_AFTER_REPLY|
CLIENT_CLOSE_ASAP| CLIENT_CLOSE_ASAP|
CLIENT_BLOCKED| CLIENT_BLOCKED)))
CLIENT_UNBLOCKED)))
{ {
replicationCacheMaster(c); replicationCacheMaster(c);
return; return;
......
...@@ -1367,6 +1367,10 @@ void evalGenericCommand(client *c, int evalsha) { ...@@ -1367,6 +1367,10 @@ void evalGenericCommand(client *c, int evalsha) {
* script timeout was detected. */ * script timeout was detected. */
aeCreateFileEvent(server.el,c->fd,AE_READABLE, aeCreateFileEvent(server.el,c->fd,AE_READABLE,
readQueryFromClient,c); readQueryFromClient,c);
if (server.masterhost && server.master) {
server.master->flags |= CLIENT_UNBLOCKED;
listAddNodeTail(server.unblocked_clients,server.master);
}
} }
server.lua_caller = NULL; server.lua_caller = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment