Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/redis_ai_objects/model.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ int RAI_GetModelFromKeyspace(RedisModuleCtx *ctx, RedisModuleString *keyName, RA
RedisModule_Log(ctx, "warning", "could not load %s from keyspace, key doesn't exist",
RedisModule_StringPtrLen(keyName, NULL));
RAI_SetError(err, RAI_EKEYEMPTY, "ERR model key is empty");
return REDISMODULE_ERR;
#else
if (VerifyKeyInThisShard(ctx, keyName)) { // Relevant for enterprise cluster.
RAI_SetError(err, RAI_EKEYEMPTY, "ERR model key is empty");
Expand All @@ -232,6 +231,7 @@ int RAI_GetModelFromKeyspace(RedisModuleCtx *ctx, RedisModuleString *keyName, RA
"ERR CROSSSLOT Keys in request don't hash to the same slot");
}
#endif
return REDISMODULE_ERR;
}
if (RedisModule_ModuleTypeGetType(key) != RedisAI_ModelType) {
RedisModule_CloseKey(key);
Expand Down
1 change: 0 additions & 1 deletion src/redis_ai_objects/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ int RAI_GetScriptFromKeyspace(RedisModuleCtx *ctx, RedisModuleString *keyName, R
RedisModule_Log(ctx, "warning", "could not load %s from keyspace, key doesn't exist",
RedisModule_StringPtrLen(keyName, NULL));
RAI_SetError(err, RAI_EKEYEMPTY, "ERR script key is empty");
return REDISMODULE_ERR;
#else
if (VerifyKeyInThisShard(ctx, keyName)) { // Relevant for enterprise cluster.
RAI_SetError(err, RAI_EKEYEMPTY, "ERR script key is empty");
Expand Down
4 changes: 2 additions & 2 deletions src/redisai.c
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
return REDISMODULE_ERR;

if (RedisModule_CreateCommand(ctx, "ai.scriptget", RedisAI_ScriptGet_RedisCommand, "readonly",
0, 0, 0) == REDISMODULE_ERR)
1, 1, 1) == REDISMODULE_ERR)
return REDISMODULE_ERR;

if (RedisModule_CreateCommand(ctx, "ai.scriptdel", RedisAI_ScriptDel_RedisCommand, "write", 1,
Expand All @@ -1403,7 +1403,7 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
return REDISMODULE_ERR;

if (RedisModule_CreateCommand(ctx, "ai._scriptscan", RedisAI_ScriptScan_RedisCommand,
"readonly", 1, 1, 1) == REDISMODULE_ERR)
"readonly", 0, 0, 0) == REDISMODULE_ERR)
return REDISMODULE_ERR;

if (RedisModule_CreateCommand(ctx, "ai.info", RedisAI_Info_RedisCommand, "readonly", 1, 1, 1) ==
Expand Down