Michael Ho has posted comments on this change.

Change subject: IMPALA-2550: Switch to per-query exec rpc
......................................................................


Patch Set 4:

(12 comments)

http://gerrit.cloudera.org:8080/#/c/6535/4/be/src/runtime/coordinator-backend-state.cc
File be/src/runtime/coordinator-backend-state.cc:

PS4, Line 434:   if (!status.ok()) return false;
Does this warrant a log message ? It's not entirely clear what's the status of 
the remote fragment instances at this point, right ? The remote fragment 
instances could still be running. The log message may make debugging in the 
field slightly easier.


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

PS4, Line 187: FinishBackendStartup
Would a better name be VerifyBackendStartup(); ?


http://gerrit.cloudera.org:8080/#/c/6535/4/be/src/runtime/fragment-instance-state.cc
File be/src/runtime/fragment-instance-state.cc:

PS4, Line 249:     report_thread_.reset(
             :         new Thread("plan-fragment-executor", "report-profile",
             :             &FragmentInstanceState::ReportProfileThread, this));
Is one reporting thread per fragment instance a bit much ? Have you considered 
using one reporting thread per fragment ?


PS4, Line 267:  //RETURN_IF_ERROR(quer
delete


PS4, Line 298: RETURN_IF_ERROR(status);
Why not RETURN_IF_ERROR(exec_tree_->GetNext(...))) at line 294 instead ?


http://gerrit.cloudera.org:8080/#/c/6535/4/be/src/runtime/fragment-instance-state.h
File be/src/runtime/fragment-instance-state.h:

PS4, Line 83: void Cancel();
Please also document whether this is idempotent.


PS4, Line 89: If the preparation phase encountered an error, GetOpenStatus() 
will
            :   /// return that error without blocking.
I don't see the opened_promise_ being updated when Prepare() fails in Exec(). 
Is that expected ?


http://gerrit.cloudera.org:8080/#/c/6535/4/be/src/runtime/query-state.cc
File be/src/runtime/query-state.cc:

PS4, Line 194: stringstream s;
Did you mean to use s somewhere ? It looks like dead code as it stands now.


PS4, Line 246: 3
How is this determined ? Should we use #define or constexpr to represent it so 
it has a more meaningful name ?


PS4, Line 250: rpc_status = Status(res.status);
Is this needed given line 256 below which assigns res.status to result_status ?


PS4, Line 317: Status status 
Not an error but there is a variable named status already in the outer scope. 
May want to have a more specific name.


http://gerrit.cloudera.org:8080/#/c/6535/4/be/src/runtime/query-state.h
File be/src/runtime/query-state.h:

PS4, Line 172: AtomicInt32 is_cancelled_;
> Is there any atomic read-modify-write operation on this flag ? Doesn't seem
To answer my own question, there is an AtomicCompareAndSwap() operations on 
this flag to avoid calling cancellation on fragments multiple times.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I20769e420711737b6b385c744cef4851cee3facd
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Marcel Kornacker <mar...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <mar...@cloudera.com>
Gerrit-Reviewer: Michael Ho <k...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to