-
Notifications
You must be signed in to change notification settings - Fork 106
Closed
Description
Describe the bug
AI.CONFIG MODEL_CHUNK_SIZE fails when called in clustered Redis environments.
To Reproduce
Steps to reproduce the behavior:
- Set up a local Redis cluster of three nodes
- Compile and execute the code below (requires hiredis)
- Vary the shard connected to by changing the port parameter in the call to
redisConnect()in line 6. - Observe that for one port, the result is
okbut for others it is in the formMOVED 2457 127.0.0.1:6379
#include <stdio.h>
#include "hiredis.h"
int main(int argc, char **argv)
{
redisContext *ctx = redisConnect("127.0.0.1", 6380);
if (ctx == NULL || ctx->err) {
printf("Connection failed\n");
return -1;
}
redisReply *reply = redisCommand(ctx, "AI.CONFIG MODEL_CHUNK_SIZE %d", 1024 * 1024);
if (reply == NULL) {
printf("Command failed (%d): %s\n", ctx->err, ctx->errstr);
return -1;
}
else {
printf("Command succeeded!\n");
printf("reply: %s\n", reply->str);
}
freeReplyObject(reply);
redisFree(ctx);
return 1;
}Expected behavior
We would expect the command to work correctly, independently of which shard it is sent to.
Screenshots
n/a
Environment (please complete the following information):
- OS: ubuntu 20.04, MacOS
- Version 1.2.3
- Platform x86
- Runtime CPU -- assume it doesn't matter
Additional context
- We note that AI.CONFIG MODEL_CHUNK_SIZE is not covered in the RedisAI unit tests; nor is it supported in any of the sample clients in the RedisAI Github.
- We originally ran into this issue when attempting to use the AI.CONFIG info command in SmartRedis, which goes through Redis-plus-plus; the distillation to hiredis above was part of our debugging efforts. The only response from Redis-plus-plus was "2457", which was particularly mystifying.
- We note that the standard Redis
CONFIG SETcommand works perfectly in our code and in the test driver; we speculate that maybe there is a registration issue of some sort with AI.CONFIG?
Metadata
Metadata
Assignees
Labels
No labels