Dan Hecht has posted comments on this change. Change subject: IMPALA-2550 Introduce query-wide execution context. ......................................................................
Patch Set 8: (3 comments) Just to summarize some key points from the discussion today so we don't forget: - We agreed that ref counting is the way to go and explicit ref counting avoids "accidental" leakage of shared_ptr copies. - We agreed to restructure the fragment instance thread code so that the reference held by that thread would be done from the top-level thread method, rather than the reference being passed implicitly between classes like in the current patchset. - We agreed to try to have a hierarchical structure to the code to make ownership and lifetime as clear as possible. - We agreed that we only need reference counting at the QES level. Everything "below" would have the same lifetime as QES and does not need separate ref counting. http://gerrit.cloudera.org:8080/#/c/3817/8/be/src/service/query-exec-mgr.cc File be/src/service/query-exec-mgr.cc: Line 54: // Create or retrieve the QueryExecState for this query id. comment seems redundant with the code (especially if you rename the method as suggested below). Line 85: if (i->second->num_current_references_ == 0) return NULL; how is this possible? it looks like an invariant that anything in the map will have refcnt > 0. PS8, Line 100: Insert FindOrCreateQueryExecState() given that it creates (as opposed to inserting one that was created by the caller). -- To view, visit http://gerrit.cloudera.org:8080/3817 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I892091d6401acb2ea91ccb1623af54c6f9635e6c Gerrit-PatchSet: 8 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Sailesh Mukil <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: David Knupp <[email protected]> Gerrit-Reviewer: Henry Robinson <[email protected]> Gerrit-Reviewer: Lars Volker <[email protected]> Gerrit-Reviewer: Marcel Kornacker <[email protected]> Gerrit-Reviewer: Matthew Jacobs <[email protected]> Gerrit-Reviewer: Sailesh Mukil <[email protected]> Gerrit-HasComments: Yes
