Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/10488 )

Change subject: IMPALA-7062: fix unsafe RuntimeProfile::SortChildren() function
......................................................................

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 <tarmstr...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
---
M be/src/runtime/coordinator-backend-state.cc
M be/src/util/runtime-profile-test.cc
M be/src/util/runtime-profile.cc
M be/src/util/runtime-profile.h
4 files changed, 30 insertions(+), 26 deletions(-)

Approvals:
  Tim Armstrong: Looks good to me, approved
  Impala Public Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/10488
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie456c87c34e7d75eb7482f499e90d50de740df40
Gerrit-Change-Number: 10488
Gerrit-PatchSet: 5
Gerrit-Owner: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>

Reply via email to