MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / _QueryCtx_UnlockCommit

Function _QueryCtx_UnlockCommit

src/query_ctx.c:392–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392static void _QueryCtx_UnlockCommit
393(
394 QueryCtx *ctx
395) {
396 GraphContext *gc = ctx->gc;
397
398 ctx->internal_exec_ctx.locked_for_commit = false;
399 // release graph R/W lock
400 Graph_ReleaseLock(gc->g);
401
402 // close Key
403 RedisModule_CloseKey(ctx->internal_exec_ctx.key);
404
405 // unlock GIL
406 _QueryCtx_ThreadSafeContextUnlock(ctx);
407}
408
409// starts an ulocking flow and notifies Redis after commiting changes
410// the only writer which allow to perform the unlock and commit (replicate)

Callers 1

QueryCtx_UnlockCommitFunction · 0.85

Calls 2

Graph_ReleaseLockFunction · 0.85

Tested by

no test coverage detected