Cancel the group by processing tasks if the merging runner gets scheduled post the query timeout (#17037)

If the GroupByMergingQueryRunner gets scheduled after the query timeout, it fails to clean up the processing tasks that have been scheduled. This can lead to unnecessary processing being done for the tasks whos results won't get consumed.
This commit is contained in:
Laksh Singla 2024-09-12 15:10:27 +05:30 committed by GitHub
parent a95397e712
commit d3392a23ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -375,7 +375,7 @@ public class GroupByMergingQueryRunner implements QueryRunner<ResultRow>
GuavaUtils.cancelAll(true, future, futures);
throw new QueryInterruptedException(e);
}
catch (TimeoutException e) {
catch (QueryTimeoutException | TimeoutException e) {
log.info("Query timeout, cancelling pending results for query id [%s]", query.getId());
GuavaUtils.cancelAll(true, future, futures);
throw new QueryTimeoutException();