Sailesh Mukil has posted comments on this change.

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


Patch Set 2:

(1 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<
> Since this patch is preparing for batching (where fragments can't arrive in
Right, but this point will come up again for IMPALA-3825, where the lifetime of 
a filter coming in for aggregation is no way tied to the lifetime of the 
fragments.
And in that case, if a backend knows the [number of filters to receive + the 
number of fragments], it could set the right ref count and know exactly when to 
do a teardown. (The debug handler could atomically add/subtract a ref count 
when it's using/done-using the QES.)

This is something a shared_ptr cannot do, i.e. reserve ref counts ahead of 
time, am I right?
Because when using a shared_ptr, a bunch of fragments would arrive and leave 
causing the shared_ptr count to go to 0, which would destroy the QES. Now a 
filter comes in later and has to set it all up again (or at least a part of it).


-- 
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: Dan Hecht <[email protected]>
Gerrit-Reviewer: Henry Robinson <[email protected]>
Gerrit-Reviewer: Lars Volker <[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