| 104 | } |
| 105 | |
| 106 | static 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 | |
| 127 | static bool _index_operation_delete |
| 128 | ( |
no test coverage detected