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

Function complete_pending_request

contrib/postgres_fdw/postgres_fdw.c:7213–7232  ·  view source on GitHub ↗

* Complete a pending asynchronous request. */

Source from the content-addressed store, hash-verified

7211 * Complete a pending asynchronous request.
7212 */
7213static void
7214complete_pending_request(AsyncRequest *areq)
7215{
7216 /* The request would have been pending for a callback */
7217 Assert(areq->callback_pending);
7218
7219 /* Unlike AsyncNotify, we unset callback_pending ourselves */
7220 areq->callback_pending = false;
7221
7222 /* We begin a fetch afterwards if necessary; don't fetch */
7223 produce_tuple_asynchronously(areq, false);
7224
7225 /* Unlike AsyncNotify, we call ExecAsyncResponse ourselves */
7226 ExecAsyncResponse(areq);
7227
7228 /* Also, we do instrumentation ourselves, if required */
7229 if (areq->requestee->instrument)
7230 InstrUpdateTupleCount(areq->requestee->instrument,
7231 TupIsNull(areq->result) ? 0.0 : 1.0);
7232}
7233
7234/*
7235 * Create a tuple from the specified row of the PGresult.

Callers 1

Calls 3

ExecAsyncResponseFunction · 0.85
InstrUpdateTupleCountFunction · 0.85

Tested by

no test coverage detected