impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tarmstr...@apache.org
Subject [4/4] impala git commit: IMPALA-6511: Fix state machine in FIS::UpdateState()
Date Wed, 14 Feb 2018 01:09:14 GMT
IMPALA-6511: Fix state machine in FIS::UpdateState()

LAST_BATCH_SENT must always happen in state PRODUCING_DATA. This change
also marks "Open Finished" when receiving WAITING_FOR_FIRST_BATCH.

Change-Id: I7304205d245289cc3d7ca2217e212c844ee75e7b
Reviewed-on: http://gerrit.cloudera.org:8080/9294
Reviewed-by: Tim Armstrong <tarmstrong@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/f9971f81
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/f9971f81
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/f9971f81

Branch: refs/heads/master
Commit: f9971f81a35bad2e176fde9c93fa4a7a04214438
Parents: 887fb14
Author: Lars Volker <lv@cloudera.com>
Authored: Mon Feb 12 18:27:32 2018 -0800
Committer: Impala Public Jenkins <impala-public-jenkins@gerrit.cloudera.org>
Committed: Tue Feb 13 23:44:14 2018 +0000

----------------------------------------------------------------------
 be/src/runtime/fragment-instance-state.cc | 7 ++-----
 tests/query_test/test_observability.py    | 1 +
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/f9971f81/be/src/runtime/fragment-instance-state.cc
----------------------------------------------------------------------
diff --git a/be/src/runtime/fragment-instance-state.cc b/be/src/runtime/fragment-instance-state.cc
index f36c91d..91b33a7 100644
--- a/be/src/runtime/fragment-instance-state.cc
+++ b/be/src/runtime/fragment-instance-state.cc
@@ -407,6 +407,7 @@ void FragmentInstanceState::UpdateState(const StateEvent event)
 
     case StateEvent::WAITING_FOR_FIRST_BATCH:
       DCHECK_EQ(current_state, TFInstanceExecState::WAITING_FOR_OPEN);
+      event_sequence_->MarkEvent("Open Finished");
       next_state = TFInstanceExecState::WAITING_FOR_FIRST_BATCH;
       break;
 
@@ -429,11 +430,7 @@ void FragmentInstanceState::UpdateState(const StateEvent event)
       break;
 
     case StateEvent::LAST_BATCH_SENT:
-      if (UNLIKELY(current_state == TFInstanceExecState::WAITING_FOR_OPEN)) {
-        event_sequence_->MarkEvent("Open Finished");
-      } else {
-        DCHECK_EQ(current_state, TFInstanceExecState::PRODUCING_DATA);
-      }
+      DCHECK_EQ(current_state, TFInstanceExecState::PRODUCING_DATA);
       next_state = TFInstanceExecState::LAST_BATCH_SENT;
       break;
 

http://git-wip-us.apache.org/repos/asf/impala/blob/f9971f81/tests/query_test/test_observability.py
----------------------------------------------------------------------
diff --git a/tests/query_test/test_observability.py b/tests/query_test/test_observability.py
index 75e5194..8e803de 100644
--- a/tests/query_test/test_observability.py
+++ b/tests/query_test/test_observability.py
@@ -189,6 +189,7 @@ class TestObservability(ImpalaTestSuite):
     instances, even when there are errors."""
     events = ["Fragment Instance Lifecycle Event Timeline",
               "Prepare Finished",
+              "Open Finished",
               "First Batch Produced",
               "First Batch Sent",
               "ExecInternal Finished"]


Mime
View raw message