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 <[email protected]>

Reply via email to