@@ -128,7 +128,7 @@ int ParseModelRunCommand(RedisAI_RunInfo *rinfo, RAI_DagOp *currentOp, RedisModu
128128 int res = REDISMODULE_ERR ;
129129 // Build a ModelRunCtx from command.
130130 RedisModuleCtx * ctx = RedisModule_GetThreadSafeContext (NULL );
131- int lock_status = RedisModule_ThreadSafeContextTryLock (ctx );
131+ // int lock_status = RedisModule_ThreadSafeContextTryLock(ctx);
132132 RAI_Model * model ;
133133 long long timeout = 0 ;
134134 if (_ModelRunCommand_ParseArgs (argv , argc , ctx , & model , rinfo -> err , & currentOp -> inkeys ,
@@ -157,9 +157,9 @@ int ParseModelRunCommand(RedisAI_RunInfo *rinfo, RAI_DagOp *currentOp, RedisModu
157157 res = REDISMODULE_OK ;
158158
159159cleanup :
160- if (lock_status == REDISMODULE_OK ) {
161- RedisModule_ThreadSafeContextUnlock (ctx );
162- }
160+ // if (lock_status == REDISMODULE_OK) {
161+ // RedisModule_ThreadSafeContextUnlock(ctx);
162+ // }
163163 RedisModule_FreeThreadSafeContext (ctx );
164164 return res ;
165165}
@@ -309,7 +309,7 @@ int ParseScriptRunCommand(RedisAI_RunInfo *rinfo, RAI_DagOp *currentOp, RedisMod
309309 int res = REDISMODULE_ERR ;
310310 // Build a ScriptRunCtx from command.
311311 RedisModuleCtx * ctx = RedisModule_GetThreadSafeContext (NULL );
312- int lock_status = RedisModule_ThreadSafeContextTryLock (ctx );
312+ // int lock_status = RedisModule_ThreadSafeContextTryLock(ctx);
313313 RAI_Script * script ;
314314 const char * func_name = NULL ;
315315
@@ -341,9 +341,9 @@ int ParseScriptRunCommand(RedisAI_RunInfo *rinfo, RAI_DagOp *currentOp, RedisMod
341341 res = REDISMODULE_OK ;
342342
343343cleanup :
344- if (lock_status == REDISMODULE_OK ) {
345- RedisModule_ThreadSafeContextUnlock (ctx );
346- }
344+ // if (lock_status == REDISMODULE_OK) {
345+ // RedisModule_ThreadSafeContextUnlock(ctx);
346+ // }
347347 RedisModule_FreeThreadSafeContext (ctx );
348348 return res ;
349349}
0 commit comments