18770832...@163.com has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19621
Change subject: IMPALA-11998: Fix potential invalid iterator issue in ImpalaServer::GetQueryRecord() ...................................................................... IMPALA-11998: Fix potential invalid iterator issue in ImpalaServer::GetQueryRecord() The current ImpalaServer::GetQueryRecord() may cause the caller to access invalid iterators, although the function locks query_log_lock_ in the execution, the query_record it provides cannot guarantee to be valid, because it is out of the protection of query_log_lock_ after returning, if query_log_index_ just deletes the corresponding record at this time, then query_record will be an invalid iterator. For fix that, this patch uses shared_ptr instead of the original unique_ptr to extend the lifetime of query_record after GetQueryRecord returns. Change-Id: I1279558b0d0b2a3ba31a496c0acb84ac9d99f2f1 --- M be/src/service/impala-http-handler.cc M be/src/service/impala-server.cc M be/src/service/impala-server.h 3 files changed, 69 insertions(+), 67 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/21/19621/1 -- To view, visit http://gerrit.cloudera.org:8080/19621 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1279558b0d0b2a3ba31a496c0acb84ac9d99f2f1 Gerrit-Change-Number: 19621 Gerrit-PatchSet: 1 Gerrit-Owner: Anonymous Coward <18770832...@163.com>