impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Robinson (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-3882: Simplify some query exec state locking
Date Mon, 14 Nov 2016 21:46:55 GMT
Henry Robinson has posted comments on this change.

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


Patch Set 5:

(8 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 looked through the code and you're right.
Done


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.
Makes the scope explicit.


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
Done


PS5, Line 794: lock_guard<mutex> l(*exec_state->lock());
> Unnecessary lock.
Still, I think it's safe to take the lock as good practice; we generally recommend taking
lock() when accessing member variables for QES. 

Put it this way: GetAnalysisWarnings() doesn't say anything about whether it's thread safe
- so if someone made it not thread-safe in the future, we could get surprised here even though
the method contract hasn't changed at all.


PS5, Line 796: NULL
> nullptr
Done


PS5, Line 802: NULL
> nullptr
Done


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 
Good point! Fixed.


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


-- 
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 <henry@cloudera.com>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Sailesh Mukil <sailesh@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message