Rajesh Balamohan created HIVE-26194: ---------------------------------------
Summary: Unable to interrupt query in the middle of long compilation Key: HIVE-26194 URL: https://issues.apache.org/jira/browse/HIVE-26194 Project: Hive Issue Type: Bug Components: HiveServer2 Reporter: Rajesh Balamohan *Issue:* * Certain queries can take lot longer time to compile, depending on the number of interactions with HMS. * When user tries to cancel such queries in the middle of compilation, it doesn't work. It interrupts the process only when the entire compilation phase is complete. * Example is given below (Q66 at 10 TB TPCDS) {noformat} . . . . . . . . . . . . . . . . . . . . . . .> ,d_year . . . . . . . . . . . . . . . . . . . . . . .> ) . . . . . . . . . . . . . . . . . . . . . . .> ) x . . . . . . . . . . . . . . . . . . . . . . .> group by . . . . . . . . . . . . . . . . . . . . . . .> w_warehouse_name . . . . . . . . . . . . . . . . . . . . . . .> ,w_warehouse_sq_ft . . . . . . . . . . . . . . . . . . . . . . .> ,w_city . . . . . . . . . . . . . . . . . . . . . . .> ,w_county . . . . . . . . . . . . . . . . . . . . . . .> ,w_state . . . . . . . . . . . . . . . . . . . . . . .> ,w_country . . . . . . . . . . . . . . . . . . . . . . .> ,ship_carriers . . . . . . . . . . . . . . . . . . . . . . .> ,year . . . . . . . . . . . . . . . . . . . . . . .> order by w_warehouse_name . . . . . . . . . . . . . . . . . . . . . . .> limit 100; Interrupting... Please be patient this may take some time. Interrupting... Please be patient this may take some time. Interrupting... Please be patient this may take some time. Interrupting... Please be patient this may take some time. Interrupting... Please be patient this may take some time. Interrupting... Please be patient this may take some time. ... ... ... ,w_city ,w_county ,w_state ,w_country ,ship_carriers ,year order by w_warehouse_name limit 100 INFO : Semantic Analysis Completed (retrial = false) ERROR : FAILED: command has been interrupted: after analyzing query. INFO : Compiling command(queryId=hive_20220502040541_14c76b6f-f6d2-4ab3-ad82-522f17ede63a) has been interrupted after 32.872 seconds <<<<<<<<<<<---------------- Notice that it interrupted only after entire compilation is done at 32 seconds. Error: Query was cancelled. Illegal Operation state transition from CANCELED to ERROR (state=01000,code=0) {noformat} This becomes an issue in busy cluster. Interrupt handling should be fixed in compilation phase. -- This message was sent by Atlassian Jira (v8.20.7#820007)