impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sailesh Mukil (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-2550 Introduce query-wide execution context.
Date Tue, 23 Aug 2016 22:03:23 GMT
Sailesh Mukil has posted comments on this change.

Change subject: IMPALA-2550 Introduce query-wide execution context.

Patch Set 9:


In this patch the following is addressed:
- DescriptorTbl is not shared anymore. I've moved it back to RuntimeState as we still need
to change how the serialization/deserialization is done before we can make it shared. It will
be done in a separate patch.

- QueryExecMgr now starts fragment threads so that refcount management stays in the scope
of QueryExecMgr and is not passed to a lower level.

- FragmentInstanceExecState refcount mechanism removed. Now these objects have the same lifetime
as QueryExecState and are destroyed when QueryExecState is destroyed.

- fragment_inst_exec_state_map_ is now indexed by fragment instance index and not fragment
instance IDs. (Rebased on top of IMPALA-3988)
File be/src/service/

Line 85: 
> how is this possible? it looks like an invariant that anything in the map w
No that's not how it works.
Everytime a new fragment comes in, FindOrCreateQueryExecState() is called (in RegisterFragmentInstanceWithQuery())
which increases the refcount by 1.
Everytime a fragment completes (in QEM->ExecInstance()), ReleaseQES() is called which decrements
the refcount by 1.

This means that this refcount will ultimately reach 0.

Alternatively CancelPlanFragment() and PublishFilter() use QESGuard() which calls a GetQES()
at the beginning of its scope and a ReleaseQES() when it goes out of scope which will effectively
balance the refcount.
File be/src/service/

Line 54:   QueryExecState* query_exec_state = FindOrCreateQueryExecState(exec_params.query_ctx);
> comment seems redundant with the code (especially if you rename the method 

PS8, Line 100: 
> FindOrCreateQueryExecState() given that it creates (as opposed to inserting

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I892091d6401acb2ea91ccb1623af54c6f9635e6c
Gerrit-PatchSet: 9
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Sailesh Mukil <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: David Knupp <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Lars Volker <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Sailesh Mukil <>
Gerrit-HasComments: Yes

View raw message