Kurt Deschler has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24992 )

Change subject: IMPALA-15418: Add Bottleneck Summary to query profiles
......................................................................


Patch Set 3:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/runtime/coordinator-backend-state.h
File be/src/runtime/coordinator-backend-state.h:

http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/runtime/coordinator-backend-state.h@171
PS3, Line 171:   int64_t GetMaxInstanceCompletionTime();
Declare as const


http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/runtime/coordinator.cc
File be/src/runtime/coordinator.cc:

http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/runtime/coordinator.cc@1428
PS3, Line 1428:   for (BackendState* backend_state : backend_states_) {
const BackendState*


http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/runtime/coordinator.cc@1430
PS3, Line 1430:         max(exec_wall_time_ns, 
backend_state->GetMaxInstanceCompletionTime());
Does using completion time prevent this from being used on a running query? If 
so, it would be better to use (or fall back to) the current elapsed time so 
that bottlenecks summary is available for long-running queries without waiting 
for them to complete (if they ever do).


http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/util/summary-util.h
File be/src/util/summary-util.h:

http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/util/summary-util.h@47
PS3, Line 47:     std::vector<BottleneckEntry>* bottleneck_entries = nullptr,
These defaults seem to be here to facilitate tests but the actual code always 
passes parameters. It would be better to not have this discrepancy especially 
since it requires conditional code to handle the defaults.


http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/util/summary-util.h@52
PS3, Line 52: void AddBottleneckSummaryInfoStrings(RuntimeProfile* profile,
Declare this function static or make it a member of RuntimeProfile


http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/util/summary-util.cc
File be/src/util/summary-util.cc:

http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/util/summary-util.cc@150
PS3, Line 150: void impala::SetQueryTimeFractions(int64_t exec_wall_time_ns, 
TExecSummary* exec_summary,
This seems awkward having a function here that is updating the exec_summary 
thrift. The rest of this file is mostly printing functions. Not sure there is a 
precedent for modifying exec_summary elsewhere where this would fit better 
(static Coordinator function) or it can instead be done as part of generating 
the thrift.


http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/util/summary-util.cc@159
PS3, Line 159:   vector<pair<double, int>> candidates;
Could use boost::container::small_vector here to avoid memory allocations.


http://gerrit.cloudera.org:8080/#/c/24992/3/be/src/util/summary-util.cc@183
PS3, Line 183:   bottleneck_entries->reserve(num_entries);
This was already reserved to BOTTLENECK_MAX_ENTRIES outside of the lock



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6d63cdb9dca24981054bf7c524c1bc3cd3167452
Gerrit-Change-Number: 24992
Gerrit-PatchSet: 3
Gerrit-Owner: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>
Gerrit-Comment-Date: Thu, 22 Oct 2026 14:56:30 +0000
Gerrit-HasComments: Yes

Reply via email to