]> git.saurik.com Git - redis.git/commit
Sentinel: send SCRIPT KILL on -BUSY reply and SDOWN instance.
authorantirez <antirez@gmail.com>
Fri, 24 Aug 2012 10:29:54 +0000 (12:29 +0200)
committerantirez <antirez@gmail.com>
Fri, 24 Aug 2012 10:29:54 +0000 (12:29 +0200)
commit850789ce73dbb236591692708437e1bd705dbce3
treeeb25da0d02f033468a7e233a94d5c4daec23699b
parent01477753e6dae515d31950d94e69e132ef4ed0b4
Sentinel: send SCRIPT KILL on -BUSY reply and SDOWN instance.

From the point of view of Redis an instance replying -BUSY is down,
since it is effectively not able to reply to user requests. However
a looping script is a recoverable condition in Redis if the script still
did not performed any write to the dataset. In that case performing a
fail over is not optimal, so Sentinel now tries to restore the normal server
condition killing the script with a SCRIPT KILL command.

If the script already performed some write before entering an infinite
(or long enough to timeout) loop, SCRIPT KILL will not work and the
fail over will be triggered anyway.
src/sentinel.c