Tim Armstrong has posted comments on this change.

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


Patch Set 2:

(2 comments)

Thanks for working on this, looking forward to the final result. Some initial 
comments on the design and naming.

http://gerrit.cloudera.org:8080/#/c/3686/2/be/src/runtime/query-exec-state.h
File be/src/runtime/query-exec-state.h:

Line 22: class QueryExecState {
I think we need some new terminology to distinguish this from the client-facing 
QueryExecState in service/query-exec-state.h

It may make sense to rename them both. E.g.

this -> QueryRuntimeState
RuntimeState -> FragmentRuntimeState (assuming this is accurate)
QueryExecState -> RequestExecState (this is already suggested by a comment).


http://gerrit.cloudera.org:8080/#/c/3686/2/be/src/service/fragment-mgr.h
File be/src/service/fragment-mgr.h:

PS2, Line 80: std::shared_ptr<
The pitfall with shared_ptr is that the destructor for QueryExecState can run 
in all sorts of places. We have this pattern in the codebase but it's been a 
source of multiple hard-to-reproduce bugs.

It would be better I think to make the lifetime of QueryExecState more explicit 
by deciding the exact point when it should be cleaned up. E.g. when the last 
fragment/coordinator is destroyed? I think we really need this anyway to remove 
it from the map.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9c513d08f718699ba0c4cdb90c117aaecf95d7fc
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Lars Volker <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Henry Robinson <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Sailesh Mukil <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to