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

Function ExecAsyncNotify

src/backend/executor/execAsync.c:87–111  ·  view source on GitHub ↗

* Call the asynchronous node back when a relevant event has occurred. */

Source from the content-addressed store, hash-verified

85 * Call the asynchronous node back when a relevant event has occurred.
86 */
87void
88ExecAsyncNotify(AsyncRequest *areq)
89{
90 /* must provide our own instrumentation support */
91 if (areq->requestee->instrument)
92 InstrStartNode(areq->requestee->instrument);
93
94 switch (nodeTag(areq->requestee))
95 {
96 case T_ForeignScanState:
97 ExecAsyncForeignScanNotify(areq);
98 break;
99 default:
100 /* If the node doesn't support async, caller messed up. */
101 elog(ERROR, "unrecognized node type: %d",
102 (int) nodeTag(areq->requestee));
103 }
104
105 ExecAsyncResponse(areq);
106
107 /* must provide our own instrumentation support */
108 if (areq->requestee->instrument)
109 InstrStopNode(areq->requestee->instrument,
110 TupIsNull(areq->result) ? 0.0 : 1.0);
111}
112
113/*
114 * Call the requestor back when an asynchronous node has produced a result.

Callers 1

ExecAppendAsyncEventWaitFunction · 0.85

Calls 4

InstrStartNodeFunction · 0.85
ExecAsyncResponseFunction · 0.85
InstrStopNodeFunction · 0.85

Tested by

no test coverage detected