Henry Robinson has posted comments on this change. Change subject: IMPALA-4348 / IMPALA-4333: Improve coordinator fragment cancellation ......................................................................
Patch Set 1: (4 comments) http://gerrit.cloudera.org:8080/#/c/4865/1/be/src/exec/plan-root-sink.cc File be/src/exec/plan-root-sink.cc: Line 163: consumer_cv_.wait(l); > As far as I can see, PlanRootSink can still be destroyed while a thread A i You're right, but the lifetime of the PRS is managed by the consumer and the sender, which coordinate out-of-scope here. In this patch we do that via the shared_ptr to the fragment instance. http://gerrit.cloudera.org:8080/#/c/4865/1/be/src/runtime/coordinator.cc File be/src/runtime/coordinator.cc: Line 520: return Status(Substitute("Root fragment instance ($0) failed", PrintId(query_id_))); > would the query ultimately fail with this status or with the status returne The query will fail with this error message. We're in a tricky position here - do we wait for an error report from the fragment, or do we return quickly? Waiting seems a bad idea to me. What we could do is try and read the status of the root fragment - if it is in error, we'll return it, otherwise we'll return the more generic message. Line 1196: // CloseConsumer() here). See IMPALA-4275 for details. > is this still accurate? if we moved this, would that eliminate the need to TearDown() also calls CloseConsumer() - so I think that moving this call wouldn't change whether we need PFE::Cancel() to call it as well. http://gerrit.cloudera.org:8080/#/c/4865/1/be/src/runtime/plan-fragment-executor.cc File be/src/runtime/plan-fragment-executor.cc: Line 509: } > nit:could be one line Done -- To view, visit http://gerrit.cloudera.org:8080/4865 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5b4e25c1d658b3929182ba5e56b5c5e881dd394a Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Henry Robinson <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Henry Robinson <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-HasComments: Yes
