MCPcopy Create free account
hub / github.com/apache/cloudberry / ExecAsyncRequest

Function ExecAsyncRequest

src/backend/executor/execAsync.c:25–52  ·  view source on GitHub ↗

* Asynchronously request a tuple from a designed async-capable node. */

Source from the content-addressed store, hash-verified

23 * Asynchronously request a tuple from a designed async-capable node.
24 */
25void
26ExecAsyncRequest(AsyncRequest *areq)
27{
28 if (areq->requestee->chgParam != NULL) /* something changed? */
29 ExecReScan(areq->requestee); /* let ReScan handle this */
30
31 /* must provide our own instrumentation support */
32 if (areq->requestee->instrument)
33 InstrStartNode(areq->requestee->instrument);
34
35 switch (nodeTag(areq->requestee))
36 {
37 case T_ForeignScanState:
38 ExecAsyncForeignScanRequest(areq);
39 break;
40 default:
41 /* If the node doesn't support async, caller messed up. */
42 elog(ERROR, "unrecognized node type: %d",
43 (int) nodeTag(areq->requestee));
44 }
45
46 ExecAsyncResponse(areq);
47
48 /* must provide our own instrumentation support */
49 if (areq->requestee->instrument)
50 InstrStopNode(areq->requestee->instrument,
51 TupIsNull(areq->result) ? 0.0 : 1.0);
52}
53
54/*
55 * Give the asynchronous node a chance to configure the file descriptor event

Callers 2

ExecAppendAsyncBeginFunction · 0.85
ExecAppendAsyncRequestFunction · 0.85

Calls 5

ExecReScanFunction · 0.85
InstrStartNodeFunction · 0.85
ExecAsyncResponseFunction · 0.85
InstrStopNodeFunction · 0.85

Tested by

no test coverage detected