impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ho (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-2550: Switch to per-query exec rpc
Date Fri, 14 Apr 2017 23:30:17 GMT
Michael Ho has posted comments on this change.

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

Patch Set 4:

File be/src/runtime/

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.
File be/src/runtime/

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

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

PS4, Line 298: RETURN_IF_ERROR(status);
Why not RETURN_IF_ERROR(exec_tree_->GetNext(...))) at line 294 instead ?
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
File be/src/runtime/

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.
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
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I20769e420711737b6b385c744cef4851cee3facd
Gerrit-PatchSet: 4
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Marcel Kornacker <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Henry Robinson <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-Reviewer: Michael Ho <>
Gerrit-HasComments: Yes

View raw message