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

Function abort_and_check_timeout

src/commands/cmd_query.c:106–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106static bool abort_and_check_timeout
107(
108 GraphQueryCtx *gq_ctx,
109 ExecutionPlan *plan
110) {
111 // abort timeout if set
112 if(gq_ctx->timeout != 0) {
113 Cron_AbortTask(gq_ctx->timeout);
114 }
115
116 // emit error if query timed out
117 // TODO for the abort feature this won't necessarily mean a timeout,
118 // it will also flag the aborted queries.
119 const bool has_timed_out = ExecutionPlan_Drained(plan);
120 if (has_timed_out) {
121 ErrorCtx_SetError("Query timed out");
122 }
123
124 return has_timed_out;
125}
126
127static bool _index_operation_delete
128(

Callers 1

_ExecuteQueryFunction · 0.85

Calls 3

Cron_AbortTaskFunction · 0.85
ExecutionPlan_DrainedFunction · 0.85
ErrorCtx_SetErrorFunction · 0.85

Tested by

no test coverage detected