diff options
author | antirez <antirez@gmail.com> | 2018-08-31 16:07:03 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-09-04 12:53:48 +0200 |
commit | 8bf42f603188ef10ff649a85323f1e29535ec667 (patch) | |
tree | 4e7aba544d7589b97fe383ef1537e473aa620de1 | |
parent | c2b104c73cb2c08582268c5dbceea47260ca24b7 (diff) | |
download | redis-8bf42f603188ef10ff649a85323f1e29535ec667.tar.gz |
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.
-rw-r--r-- | src/networking.c | 3 | ||||
-rw-r--r-- | src/scripting.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/networking.c b/src/networking.c index eb581462b..27c695306 100644 --- a/src/networking.c +++ b/src/networking.c @@ -827,8 +827,7 @@ void freeClient(client *c) { serverLog(LL_WARNING,"Connection with master lost."); if (!(c->flags & (CLIENT_CLOSE_AFTER_REPLY| CLIENT_CLOSE_ASAP| - CLIENT_BLOCKED| - CLIENT_UNBLOCKED))) + CLIENT_BLOCKED))) { replicationCacheMaster(c); return; diff --git a/src/scripting.c b/src/scripting.c index 0ef8d2a6f..4b36a085b 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -1367,6 +1367,10 @@ void evalGenericCommand(client *c, int evalsha) { * script timeout was detected. */ aeCreateFileEvent(server.el,c->fd,AE_READABLE, readQueryFromClient,c); + if (server.masterhost && server.master) { + server.master->flags |= CLIENT_UNBLOCKED; + listAddNodeTail(server.unblocked_clients,server.master); + } } server.lua_caller = NULL; |