Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace usages of InterruptPending to the flag of query cancellation …
…(#13148) Currently some communication routines between master and segments performing polling of messages from segments rely on InterruptPending flag in detection of cancel or terminating events. This flag is used to define some interruption in CHECK_FOR_INTERRUPTS() routine. Up to some time this flag was closely assigned with some exceptional case, more often with cancel or termination request. But as GPDB merges with newest versions of PostgreSQL, there are more and more cases where interruption begins to denote some not certainly causing error thing, e.g., periodic check of connectivity with client. For this reason it becomes necessary to redefine the usages of InterruptPending flag to no longer erroneously evaluate the set InterruptPending flag as cancel request. Current patch fixes four places of InterruptPending usage in waiting loops of master-segments communication. Some waiting loops might last a long time and injecting of CHECK_FOR_INTERRUPTS() call to there is necessary to not postpone interruption requests to much. But in other loops the waiting is short enough if connectivity between master and segments is preserved, therefore the check on cancellation or termination in those loops is enough. The case of connection abort or hanging on segments side have to be handled in separate work since it will require to rewrite the logic in waiting loop. This PR is the prerequisite for https://github.com/greenplum-db/gpdb/pull/12223
- Loading branch information