mirror of
https://github.com/fluencelabs/redis
synced 2025-03-24 03:20:49 +00:00
Use RESTORE-ASKING for MIGRATE when in cluster mode.
This commit is contained in:
parent
ea7fc82a4a
commit
786b8d6c87
@ -1816,7 +1816,11 @@ try_again:
|
||||
if (ttl < 1) ttl = 1;
|
||||
}
|
||||
redisAssertWithInfo(c,NULL,rioWriteBulkCount(&cmd,'*',replace ? 5 : 4));
|
||||
redisAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"RESTORE",7));
|
||||
if (server.cluster_enabled)
|
||||
redisAssertWithInfo(c,NULL,
|
||||
rioWriteBulkString(&cmd,"RESTORE-ASKING",14));
|
||||
else
|
||||
redisAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"RESTORE",7));
|
||||
redisAssertWithInfo(c,NULL,c->argv[3]->encoding == REDIS_ENCODING_RAW);
|
||||
redisAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,c->argv[3]->ptr,sdslen(c->argv[3]->ptr)));
|
||||
redisAssertWithInfo(c,NULL,rioWriteBulkLongLong(&cmd,ttl));
|
||||
|
Loading…
x
Reference in New Issue
Block a user