Hello Michael Ho, Thomas Tauber-Marshall, Bikramjeet Vig, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/14744 to look at the new patch set (#3). Change subject: IMPALA-6894: Use an internal representation of query states in ClientRequestState ...................................................................... IMPALA-6894: Use an internal representation of query states in ClientRequestState Re-factors the state machine of ClientRequestState so that it uses an internal state represetation rather than using the one defined by TOperationState. The possible states are defined in ClientRequestState::ExecState and the possible state transitions are outlined in client-request-state.h and enforced in ClientRequestState::UpdateNonErrorExecState. The states defined in ClientRequestState::ExecState are the same states currently used in TOperationState. This patch simply makes it easy to define new states in the future. The value of ClientRequestState::ExecState is exposed to clients via the entry "Impala Query State" in the runtime profile. It is meant to be the Impala specific version of "Query State" (which is the Beeswax state). This allows Impala to expose its internal state without breaking existing clients that might rely on the value of "Query State". Additional Bug Fixes: * Previously, UpdateNonErrorOperationState would ignore attempts to make illegal state transitions, now the method uses DCHECKs to ensure only valid state transitions are attempted; this required fixing a possible race condition where a query could transition from RUNNING to PENDING * The ClientRequestState state is now tracked using an AtomicEnum, which fixes a few possible race conditions where the state was being read without holding the ClientRequestState::lock_ Testing: * Ran core tests * Added test to make sure "Impala Query State" is populated Change-Id: I1ce70bd2e964b309ebfc9d6ff6d900485db4d630 --- M be/src/service/client-request-state.cc M be/src/service/client-request-state.h M be/src/service/impala-beeswax-server.cc M be/src/service/impala-hs2-server.cc M be/src/service/impala-http-handler.cc M be/src/service/impala-server.cc M tests/query_test/test_observability.py M tests/util/cancel_util.py 8 files changed, 190 insertions(+), 95 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/44/14744/3 -- To view, visit http://gerrit.cloudera.org:8080/14744 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1ce70bd2e964b309ebfc9d6ff6d900485db4d630 Gerrit-Change-Number: 14744 Gerrit-PatchSet: 3 Gerrit-Owner: Sahil Takiar <stak...@cloudera.com> Gerrit-Reviewer: Bikramjeet Vig <bikramjeet....@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Michael Ho <k...@cloudera.com> Gerrit-Reviewer: Sahil Takiar <stak...@cloudera.com> Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com>