mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Merge pull request #7175 from bsergean/bsergean-patch-1
redis-cli cluster reshard does not work with ACL (AUTH2 MIGRATE args un-implemented)
This commit is contained in:
commit
54cb8214d9
@ -3416,6 +3416,7 @@ static redisReply *clusterManagerMigrateKeysInReply(clusterManagerNode *source,
|
|||||||
size_t *argv_len = NULL;
|
size_t *argv_len = NULL;
|
||||||
int c = (replace ? 8 : 7);
|
int c = (replace ? 8 : 7);
|
||||||
if (config.auth) c += 2;
|
if (config.auth) c += 2;
|
||||||
|
if (config.user) c += 1;
|
||||||
size_t argc = c + reply->elements;
|
size_t argc = c + reply->elements;
|
||||||
size_t i, offset = 6; // Keys Offset
|
size_t i, offset = 6; // Keys Offset
|
||||||
argv = zcalloc(argc * sizeof(char *));
|
argv = zcalloc(argc * sizeof(char *));
|
||||||
@ -3442,12 +3443,24 @@ static redisReply *clusterManagerMigrateKeysInReply(clusterManagerNode *source,
|
|||||||
offset++;
|
offset++;
|
||||||
}
|
}
|
||||||
if (config.auth) {
|
if (config.auth) {
|
||||||
argv[offset] = "AUTH";
|
if (config.user) {
|
||||||
argv_len[offset] = 4;
|
argv[offset] = "AUTH2";
|
||||||
offset++;
|
argv_len[offset] = 5;
|
||||||
argv[offset] = config.auth;
|
offset++;
|
||||||
argv_len[offset] = strlen(config.auth);
|
argv[offset] = config.user;
|
||||||
offset++;
|
argv_len[offset] = strlen(config.user);
|
||||||
|
offset++;
|
||||||
|
argv[offset] = config.auth;
|
||||||
|
argv_len[offset] = strlen(config.auth);
|
||||||
|
offset++;
|
||||||
|
} else {
|
||||||
|
argv[offset] = "AUTH";
|
||||||
|
argv_len[offset] = 4;
|
||||||
|
offset++;
|
||||||
|
argv[offset] = config.auth;
|
||||||
|
argv_len[offset] = strlen(config.auth);
|
||||||
|
offset++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
argv[offset] = "KEYS";
|
argv[offset] = "KEYS";
|
||||||
argv_len[offset] = 4;
|
argv_len[offset] = 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user