Sailesh Mukil has uploaded a new patch set (#4).

Change subject: IMPALA-4014: PARALLEL HEADERS ONLY: Introduce query-wide 
execution state.

IMPALA-4014: PARALLEL HEADERS ONLY: Introduce query-wide execution state.

This patch is a header preview of a query wide execution state for
a backend.

None of the existing headers are replaced, they are just added in
parallel to existing headers and not considered for compilation.

Changes in design are as follows:

FragmentExecState -> FInstanceState
  This is now what was previously the FragmentExecState and the
  PlanFragmentExecutor together. The ReportStatusCallback is removed
  and now SendReport() is in charge of sending the report directly.
  The callback was in place originally only so the PlanFragmentExecutor
  could call into the FragmentExecState without a reference. This is
  not necessary anymore.

PlanFragmentExecutor (collapsed into FInstanceState)

FragmentMgr -> QueryExecMgr
  The QueryExecMgr now receives incoming fragments, creates a new
  QueryState if it is the first fragment to arrive for that
  query, and passes this received fragment along to the QueryState.
  This class is responsible for cleaning up the QueryState.

QueryState (new):
  This is the query wide state for the backend. It is initialized by
  the first fragment to arrive to the QueryExecMgr. This class is now
  responsible for creating FInstanceStates and executing them.
  Its life is protected by a ref counting mechanism and it is
  scheduled for destruction once the ref count reaches zero.
  Once scheduled for destruction, a thread in the QueryExecMgr will
  destroy the QueryState.
  Every user of the QueryState must access it within the scope of a
  'Guard' object which guarantees ref count incrementing and
  decrementing at entry/exit of the scope.

 - All .cc files to make use of changes made.

Change-Id: If58292a5c377660d97e7e7cc0c3122328eba72ed
A be/src/runtime/fragment-instance-state.h
A be/src/runtime/query-state.h
M be/src/runtime/runtime-state.h
A be/src/service/query-exec-mgr.h
4 files changed, 586 insertions(+), 8 deletions(-)

  git pull ssh:// refs/changes/01/4301/4
To view, visit
To unsubscribe, visit

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If58292a5c377660d97e7e7cc0c3122328eba72ed
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <>
Gerrit-Reviewer: Lars Volker <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Sailesh Mukil <>

Reply via email to