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

Function S3QueryIsAbortInProgress

gpcontrib/gpcloud/src/gpcloud.cpp:55–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 */
54static bool queryCancelFlag = false;
55bool S3QueryIsAbortInProgress(void) {
56 bool queryIsBeingCancelled = QueryCancelPending || IsAbortInProgress();
57
58 // We need a thread-safe way to query and set queryCancelFlag.
59 // queryCancelFlag is set to TRUE for the first time when cancel signal is
60 // detected. If cancel signal is already captured, value will not be
61 // swapped and queryIsCancelledAlready is true.
62 bool queryIsCancelledAlready =
63 !__sync_bool_compare_and_swap(&queryCancelFlag, false, queryIsBeingCancelled);
64
65 return queryIsBeingCancelled || queryIsCancelledAlready;
66}
67
68void *S3Alloc(size_t size) {
69 return palloc(size);

Callers 12

readMethod · 0.70
fillMethod · 0.70
DownloadThreadFuncFunction · 0.70

Calls 1

IsAbortInProgressFunction · 0.85

Tested by

no test coverage detected