]> git.saurik.com Git - redis.git/commit - src/scripting.c
Differentiate SCRIPT KILL error replies.
authorantirez <antirez@gmail.com>
Mon, 22 Oct 2012 08:28:54 +0000 (10:28 +0200)
committerantirez <antirez@gmail.com>
Mon, 22 Oct 2012 08:31:28 +0000 (10:31 +0200)
commitacfe3675e3c5ab8ee2ca07642334d9468cfc4d39
treeff78c6d2e8286b51ffed08aae20299c3b86890e0
parenta1b1c1ea3adb864c8c2e3feb4eaed890a9b505cf
Differentiate SCRIPT KILL error replies.

When calling SCRIPT KILL currently you can get two errors:

* No script in timeout (busy) state.
* The script already performed a write.

It is useful to be able to distinguish the two errors, but right now both
start with "ERR" prefix, so string matching (that is fragile) must be used.

This commit introduces two different prefixes.

-NOTBUSY and -UNKILLABLE respectively to reply with an error when no
script is busy at the moment, and when the script already executed a
write operation and can not be killed.
src/scripting.c
tests/unit/scripting.tcl