Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/11337 )
Change subject: IMPALA-7335: Fix a race in HdfsScanNode ...................................................................... Patch Set 3: (1 comment) http://gerrit.cloudera.org:8080/#/c/11337/3/be/src/exec/hdfs-scan-node.cc File be/src/exec/hdfs-scan-node.cc: http://gerrit.cloudera.org:8080/#/c/11337/3/be/src/exec/hdfs-scan-node.cc@518 PS3, Line 518: if (status_.ok()) { We have three variants of the "set status_ then call SetDone*()" logic in the file. Should we consolidate them to make this easier to understand and tighten up the invariant that status_ must be set at the same time as done_? E.g. by adding a Status argument to SetDone(). I think the following logic might be sufficient for all the callsites. void HdfsScanNode::SetDoneInternal(const Status& status) { if (done_) return; DCHECK(status_.ok()); done_ = true; if (!status.ok() && !status.IsCancelled()) status_ = status; if (reader_context_ != nullptr) reader_context_->Cancel(); thread_state_.Shutdown(); } -- To view, visit http://gerrit.cloudera.org:8080/11337 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id470818846a5c69ad28a6ff695069702982aa793 Gerrit-Change-Number: 11337 Gerrit-PatchSet: 3 Gerrit-Owner: Pooja Nilangekar <pooja.nilange...@cloudera.com> Gerrit-Reviewer: Bikramjeet Vig <bikramjeet....@cloudera.com> Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Pooja Nilangekar <pooja.nilange...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Comment-Date: Tue, 28 Aug 2018 23:34:09 +0000 Gerrit-HasComments: Yes