[ https://issues.apache.org/jira/browse/KYLIN-5392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jiale He resolved KYLIN-5392. ----------------------------- Resolution: Fixed > The query cannot be canceled immediately if it exceeds the timeout period > ------------------------------------------------------------------------- > > Key: KYLIN-5392 > URL: https://issues.apache.org/jira/browse/KYLIN-5392 > Project: Kylin > Issue Type: Bug > Components: Query Engine > Affects Versions: 5.0-alpha > Reporter: Jiale He > Assignee: Jiale He > Priority: Major > Fix For: 5.0-alpha > > Attachments: image-2023-01-09-17-58-49-310.png, > image-2023-01-09-17-59-13-427.png, image-2023-01-09-18-02-42-960.png, test.sql > > > badquery到900S才被cancel,预期应该是超过300S就被cancel > !image-2023-01-09-17-59-13-427.png|width=480,height=287! > > {color:#de350b}复现SQL见附件 test.sql{color} > h1. Root Cause > 从这条 SQL 来看,卡在了 RestoreFromComputedColumn 这个里面,这个操作特别耗时,里面会最大调用 10次,对于这条 > SQL,第一次耗时将近花了 250s,所以走到这个逻辑里面就需要等待执行完毕才能退出来,查询被取消。 > !image-2023-01-09-18-02-42-960.png! > 此外,在 SparkSqlClient 这里面在取数据的时候也存在类似问题。 > > h1. Fix Design > RestoreFromComputedColumn逻辑里面增加两个取消的锚点,阶段性执行完毕的时候如果用户发出了取消请求,在锚点处进行中断检查。 > 对于SparkSqlClient迭代器取数增加锚点,每1000条会做一次检查。 > > > -- This message was sent by Atlassian Jira (v8.20.10#820010)