Sailesh Mukil has posted comments on this change.

Change subject: IMPALA-3882: Simplify some query exec state locking
......................................................................


Patch Set 5:

(9 comments)

http://gerrit.cloudera.org:8080/#/c/4935/4/be/src/service/impala-beeswax-server.cc
File be/src/service/impala-beeswax-server.cc:

Line 279:     return;
> I think that race exists currently, and is benign. If you look at https://g
I looked through the code and you're right.
I think we should add a comment (maybe in the header file) stating that as long 
as someone has access to a QES, they can still access all the member variables 
and functions of that object, despite the query being unregistered and despite 
having Done() called on it.


http://gerrit.cloudera.org:8080/#/c/4935/5/be/src/service/impala-beeswax-server.cc
File be/src/service/impala-beeswax-server.cc:

PS5, Line 250: {
Spurious braces.


http://gerrit.cloudera.org:8080/#/c/4935/5/be/src/service/impala-hs2-server.cc
File be/src/service/impala-hs2-server.cc:

PS5, Line 700: NULL
nullptr


PS5, Line 794: lock_guard<mutex> l(*exec_state->lock());
Unnecessary lock.

The coord() pointer never changes during the exec_state lifetime, and 
progress() and GetErrorLog() cannot be sync'd with this lock.

And GetAnalysisWarnings() never changes after planning.


PS5, Line 796: NULL
nullptr


PS5, Line 802: NULL
nullptr


http://gerrit.cloudera.org:8080/#/c/4935/4/be/src/service/impala-server.cc
File be/src/service/impala-server.cc:

Line 789:   // start execution of query; also starts fragment status reports
> Do you mean this comment to be on line 785? Cancel() could happen before th
Ah, nvm, I didn't see the scope braces.


http://gerrit.cloudera.org:8080/#/c/4935/5/be/src/service/query-exec-state.cc
File be/src/service/query-exec-state.cc:

PS5, Line 568: // Query may have been cancelled during planning. 'status' will 
reflect that after
             :     // UpdateQueryStatus().
This isn't true. If planning succeeded, and the query was cancelled before 
taking the above lock, UpdateQueryStatus() will not return a bad status.
https://github.com/apache/incubator-impala/blob/master/be/src/service/query-exec-state.cc#L697


PS5, Line 575: RETURN_IF_ERROR(status);
And this would be RETURN_IF_ERROR(query_status());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I516357d2b5e9eb83e8209872cbe4c078c778a629
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson <[email protected]>
Gerrit-Reviewer: Henry Robinson <[email protected]>
Gerrit-Reviewer: Sailesh Mukil <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to