Sailesh Mukil has posted comments on this change. Change subject: PREVIEW: IMPALA-2550 Introduce query-wide execution context. ......................................................................
Patch Set 3: (1 comment) http://gerrit.cloudera.org:8080/#/c/3817/3/be/src/runtime/query-exec-state.cc File be/src/runtime/query-exec-state.cc: PS3, Line 72: QueryExecMgr::ScopedQueryExecStateRef s(*query_exec_mgr, this); Bug: I would have to call GetQES(query_ctx_.query_id) before this line to increment the ref count (as the lock governing atomic increase/decrease of the ref count is the QueryExecMgr wide query_exec_state_map_lock_ itself; which means only one thread across all queries can get a single QES at a given time). This seems really messy and can be completely avoided by using shared pointers. With shared pointers, during object destruction, I could hold the object level lock while removing the QES from the query_exec_state_map_. Now, since the map contains a unique_ptr, I cannot hold an object level lock while removing the QES object from the map. -- 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: 3 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Sailesh Mukil <[email protected]> Gerrit-Reviewer: Sailesh Mukil <[email protected]> Gerrit-HasComments: Yes
