mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
We use LOG_AND_RETURN_IF_ERROR to log the non-ok status of executing the DDL. However, when enable_async_ddl_execution is true (default), the returned status of ExecDdlRequest() and ExecLoadDataRequest() are about creating the async thread. It's not the error of executing the statement. If the DDL fails, no errors will be shown in impalad logs. This patch fixes it by logging the error when UpdateQueryStatus() is invoked by the async exec thread. A new parameter, 'log_error', is added to this method to control the logging behavior. It's false by default and only set to true when used in the async thread. Tests - Add e2e test to verify the error in logs Change-Id: I8f02f22fa8ebbd2dea722d5586899bf57b66cf40 Reviewed-on: http://gerrit.cloudera.org:8080/20925 Reviewed-by: Wenzhe Zhou <wzhou@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>