You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "Henry Robinson (Code Review)" <ge...@cloudera.org> on 2016/07/20 00:03:47 UTC

[Impala-CR](cdh5-trunk) IMPALA-3882: Rework some concurrency control in QueryExecState

Henry Robinson has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/3681

Change subject: IMPALA-3882: Rework some concurrency control in QueryExecState
......................................................................

IMPALA-3882: Rework some concurrency control in QueryExecState

This patch addresses three areas of improvement in QueryExecState:

1. Don't hold exec state lock while planning; since planning is blocking
this queues up other operations like looking at the webpage for that
query. This allows cancellation calls to finish more quickly, and
unblocks the debug web page when it tries to iterate over all running
queries.

To preserve the invariant that result_metadata() is valid after
planning, add QueryExecState::WaitForPlanning() so that callers can be
sure the planning process has finished.

2. Remove argument to GetQueryExecState() that could take the lock
before yielding the map lock. Having this path complicates the locking
protocols for QueryExecState to no particularly good end. Having this
path allows callers to be sure that if the exec state has returned it
will not have been cancelled. Instead, callers should lock the exec
state themselves and check for cancellation.

3. Simplify waiting logic in QueryExecState::BlockOnWait() to use
promise rather than condition variables.

Change-Id: Ib22789d51e24e00feffe86042460b9241f28d896
---
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 be/src/service/impala-server.h
M be/src/service/query-exec-state.cc
M be/src/service/query-exec-state.h
M be/src/service/query-state-accessor.cc
8 files changed, 107 insertions(+), 124 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/81/3681/1
-- 
To view, visit http://gerrit.cloudera.org:8080/3681
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib22789d51e24e00feffe86042460b9241f28d896
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Henry Robinson <he...@cloudera.com>

[Impala-CR](cdh5-trunk) IMPALA-3882: Rework some concurrency control in QueryExecState

Posted by "Henry Robinson (Code Review)" <ge...@cloudera.org>.
Henry Robinson has abandoned this change.

Change subject: IMPALA-3882: Rework some concurrency control in QueryExecState
......................................................................


Abandoned

Abandoning for now as the patch has a bug, will follow up in ASF project when that's fixed.

-- 
To view, visit http://gerrit.cloudera.org:8080/3681
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ib22789d51e24e00feffe86042460b9241f28d896
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Henry Robinson <he...@cloudera.com>