You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/02/27 21:45:40 UTC

[5/5] impala git commit: IMPALA-2990: Add a warning message during cancellation

IMPALA-2990: Add a warning message during cancellation

Until IMPALA-2990 is fixed, there is no easy way to
prevent query hangs due to cancellation of fragment
instances in a backend node when it fails to report
status to the coordinator. Given it's rather hard to
diagnose IMPALA-2990, this change adds a log statement
at the point of cancellation to warn about IMPALA-2990.
This hopefully makes diagnostics slightly easier.

Change-Id: Icfd56edfe74707592f4dd9c840550b13cb80e9a0
Reviewed-on: http://gerrit.cloudera.org:8080/9413
Reviewed-by: Joe McDonnell <jo...@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/61ca7be6
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/61ca7be6
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/61ca7be6

Branch: refs/heads/master
Commit: 61ca7be6ec6da060b0f1a03725be6bff17b51146
Parents: 881600c
Author: Michael Ho <kw...@cloudera.com>
Authored: Thu Feb 22 17:37:01 2018 -0800
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Tue Feb 27 11:43:10 2018 +0000

----------------------------------------------------------------------
 be/src/runtime/query-state.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/61ca7be6/be/src/runtime/query-state.cc
----------------------------------------------------------------------
diff --git a/be/src/runtime/query-state.cc b/be/src/runtime/query-state.cc
index 5a11caf..b290784 100644
--- a/be/src/runtime/query-state.cc
+++ b/be/src/runtime/query-state.cc
@@ -274,8 +274,13 @@ void QueryState::ReportExecStatusAux(bool done, const Status& status,
     // report, following this Cancel(), may not succeed anyway.)
     // TODO: not keeping an error status here means that all instances might
     // abort with CANCELLED status, despite there being an error
-    // TODO: Fix IMPALA-2990. Cancelling fragment instances here may cause query to
-    // hang as the coordinator may not be aware of the cancellation.
+    if (!rpc_status.ok()) {
+      // TODO: Fix IMPALA-2990. Cancelling fragment instances here may cause query to
+      // hang as the coordinator may not be aware of the cancellation. Remove the log
+      // statement once IMPALA-2990 is fixed.
+      LOG(ERROR) << "Cancelling fragment instances due to failure to report status. "
+                 << "Query " << PrintId(query_id()) << " may hang. See IMPALA-2990.";
+    }
     Cancel();
   }
 }