mirror of
https://github.com/fluencelabs/redis
synced 2025-06-25 15:01:33 +00:00
RESTORE: reply with -BUSYKEY special error code.
The error when the target key is busy was a generic one, while it makes sense to be able to distinguish between the target key busy error and the others easily.
This commit is contained in:
@ -3791,7 +3791,7 @@ void restoreCommand(redisClient *c) {
|
||||
|
||||
/* Make sure this key does not already exist here... */
|
||||
if (!replace && lookupKeyWrite(c->db,c->argv[1]) != NULL) {
|
||||
addReplyError(c,"Target key name is busy.");
|
||||
addReply(c,shared.busykeyerr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user