Sailesh Mukil has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10158 )

Change subject: IMPALA-5384, part 2: Simplify Coordinator locking and clarify 
state
......................................................................


Patch Set 19:

(12 comments)

LGTM overall, just a few comments, some relating to style.

http://gerrit.cloudera.org:8080/#/c/10158/19/be/src/runtime/coordinator.h
File be/src/runtime/coordinator.h:

http://gerrit.cloudera.org:8080/#/c/10158/19/be/src/runtime/coordinator.h@93
PS19, Line 93: /// 2. exec_state_lock_, filter_lock_, ExecSummary::lock (leafs)
What about backend_states_init_lock_ ?


http://gerrit.cloudera.org:8080/#/c/10158/19/be/src/runtime/coordinator.h@206
PS19, Line 206: lock_
comment requires an update.


http://gerrit.cloudera.org:8080/#/c/10158/18/be/src/runtime/coordinator.h
File be/src/runtime/coordinator.h:

http://gerrit.cloudera.org:8080/#/c/10158/18/be/src/runtime/coordinator.h@325
PS18, Line 325: ExecState state
const ref


http://gerrit.cloudera.org:8080/#/c/10158/18/be/src/runtime/coordinator.h@350
PS18, Line 350: ExecState old_state, ExecState new_state
These look like they're read only, so they should be passed as const refs.


http://gerrit.cloudera.org:8080/#/c/10158/18/be/src/runtime/coordinator.h@357
PS18, Line 357: ExecState state
const ref


http://gerrit.cloudera.org:8080/#/c/10158/18/be/src/runtime/coordinator.h@360
PS18, Line 360: ExecState s
const ref


http://gerrit.cloudera.org:8080/#/c/10158/14/be/src/runtime/coordinator.h
File be/src/runtime/coordinator.h:

http://gerrit.cloudera.org:8080/#/c/10158/14/be/src/runtime/coordinator.h@127
PS14, Line 127:
You mean Cancel() and UpdateBackendExecStatus()? Maybe this is not worth 
mentioning here and can be specified in those functions instead.


http://gerrit.cloudera.org:8080/#/c/10158/14/be/src/runtime/coordinator.h@279
PS14, Line 279: _RESULTS: GetNext() set eos
To be more explicit, we should say "... or when Cancel() is called."

And we should document that Cancel() is called on an error in the appropriate 
place if we haven't done that already.


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

http://gerrit.cloudera.org:8080/#/c/10158/18/be/src/runtime/coordinator.cc@457
PS18, Line 457: ret_status
Preferable to get rid of the automatic variable 'ret_status' and just return 
exec_status_ here instead. Every time we copy statuses around, we're calling 
the copy constructor that does a string copy.


http://gerrit.cloudera.org:8080/#/c/10158/18/be/src/runtime/coordinator.cc@462
PS18, Line 462: Status ret_status;
Same here.


http://gerrit.cloudera.org:8080/#/c/10158/18/be/src/runtime/coordinator.cc@476
PS18, Line 476:       DCHECK(exec_status_.ok()) << exec_status_;
If an error happens after exec_state_ is already set to 
ExecState::RETURNED_RESULTS, do we still want to relay that in the logs?

Eg: Limit queries.

Currently, we will be adding that to the logs at L493 but we need to think 
through whether that's necessary, since calling HandleExecStateTransition() in 
L500 will also be a no-op in this case.


http://gerrit.cloudera.org:8080/#/c/10158/18/be/src/runtime/coordinator.cc@486
PS18, Line 486: !status.ok() && exec_status_.IsCancelled()
(!status.ok() && !status.IsCancelled() && exec_status_.IsCancelled())



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1abdfd02163f9356c59d470fe1c64ebe012a9e8e
Gerrit-Change-Number: 10158
Gerrit-PatchSet: 19
Gerrit-Owner: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Bikramjeet Vig <bikramjeet....@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Michael Ho <k...@cloudera.com>
Gerrit-Reviewer: Sailesh Mukil <sail...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Comment-Date: Fri, 11 May 2018 00:33:59 +0000
Gerrit-HasComments: Yes

Reply via email to