mirror of
https://github.com/apache/impala.git
synced 2025-12-25 02:03:09 -05:00
In a rare case, callback Coordinator::BackendState::ExecCompleteCb() is not called for the corresponding ExecQueryFInstances RPC when the RPC is cancelled. This causes coordinator to wait indefinitely when calling Coordinator::BackendState::Cancel() to cancel a fragment instance. This patch adds timeout for BackendState::WaitOnExecLocked() so that coordinator will not be blocked indefinitely when cancelling a query. Testing: - Added a test case to simulate the callback missing when a query is failed. Verified that the coordinator would hang without the fixing, and would not hang with the fixing. - Passed exhaustive-debug tests. Change-Id: I915511afe2df3017cbbf37f6aff3c5ff7f5473be Reviewed-on: http://gerrit.cloudera.org:8080/18439 Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>