Skip to content

Draft: issue#144: query supervisor: limits not work correctly after a query cancelation

Marcin requested to merge mi_qs_issue_#144 into develop

Previously, when a pending root query was finished and the end query handler was executed by the Postgres backend executor, the query handlers cleared their state and restarted counting limited values. However, when a pending query was canceled (for example, using the stop button in the PGADMIN query tool), the end handler was not called. As a result, the handlers treated all subsequent queries as subqueries of the already canceled root query. This leaded to situation when new queries were not broken when the time limit was exceeded becaue the timer was not re-armed.

To address this issue, a new method, bool isRootQuery(const QueryDesc& _queryDesc), has been introduced. This method provides information on whether a given query is a root query or not. When a new root query starts and the handler is still waiting for the end of the old root queries, the state of the handler is reset, and the counters of limited values are restarted (including resetting the query timeout timer).

Merge request reports

Loading