You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/06/07 23:08:00 UTC

[jira] [Commented] (IMPALA-7062) Fix unsafe RuntimeProfile::SortChildren() API

    [ https://issues.apache.org/jira/browse/IMPALA-7062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16505446#comment-16505446 ] 

ASF subversion and git services commented on IMPALA-7062:
---------------------------------------------------------

Commit c72c5dc663252a7a43c652d27e313813e758a20f in impala's branch refs/heads/master from [~tarmstrong@cloudera.com]
[ https://git-wip-us.apache.org/repos/asf?p=impala.git;h=c72c5dc ]

IMPALA-7062: fix unsafe RuntimeProfile::SortChildren() function

The API is inherently unsafe, because std::sort() can crash if a
comparator returns unstable results, e.g. because a profile
counter value changes. The generality of this function is both
unnecessary and dangerous.

The fix is to take a snapshot of the counter values and sort
based on the snapshot.

Change-Id: Ie456c87c34e7d75eb7482f499e90d50de740df40
Reviewed-on: http://gerrit.cloudera.org:8080/10488
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Fix unsafe RuntimeProfile::SortChildren() API
> ---------------------------------------------
>
>                 Key: IMPALA-7062
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7062
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 2.12.0
>            Reporter: Tim Armstrong
>            Assignee: Tim Armstrong
>            Priority: Major
>             Fix For: Impala 2.13.0, Impala 3.1.0
>
>
> As a follow-up to IMPALA-6484, we should fix the broken SortChildren() API that is not thread-safe and dangerous. We should replace it with something that sorts the children by total time using stable values that can't be modified concurrently by other threads.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org