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

Function IndexScanFree

src/execution_plan/ops/op_node_by_index_scan.c:232–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232static void IndexScanFree(OpBase *opBase) {
233 IndexScan *op = (IndexScan *)opBase;
234 /* As long as this Index iterator is alive the index is
235 * read locked, if this index scan operation is part of
236 * a query which will modified this index we'll be stuck in
237 * a dead lock, as we're unable to acquire index write lock. */
238 if(op->iter != NULL) {
239 RediSearch_ResultsIteratorFree(op->iter);
240 op->iter = NULL;
241 }
242
243 if(op->child_record != NULL) {
244 OpBase_DeleteRecord(op->child_record);
245 op->child_record = NULL;
246 }
247
248 if(op->filter != NULL) {
249 FilterTree_Free(op->filter);
250 op->filter = NULL;
251 }
252
253 if(op->unresolved_filters != NULL) {
254 FilterTree_Free(op->unresolved_filters);
255 op->unresolved_filters = NULL;
256 }
257
258 if(op->n != NULL) {
259 NodeScanCtx_Free(op->n);
260 op->n = NULL;
261 }
262}
263

Callers

nothing calls this directly

Calls 3

OpBase_DeleteRecordFunction · 0.85
FilterTree_FreeFunction · 0.85
NodeScanCtx_FreeFunction · 0.85

Tested by

no test coverage detected