Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10449 )
Change subject: IMPALA-7011: Simplify PlanRootSink control logic ...................................................................... IMPALA-7011: Simplify PlanRootSink control logic 1) The eos_ and sender_done_ bits really encode three possible states that the sender can be in. Make this explicit using an enum with three values. 2) The purpose of CloseConsumer() has changed over time and we can clean this up now: a) Originally, it looks like it was used to unblock the sender when the consumer finishes before eos, but also keep the sink alive long enough for the coordinator. This is no longer necessary now that control structures are owned by the QueryState whose lifetime is controlled by a reference count taken by the coordinator. So, we don't need the coordinator to tell the sink it's done calling it and we don't need the consumer_done_ state. b) Later on, CloseConsumer() was used as a cancellation mechinism. We need to keep this around (or use timeouts on the condvars) to kick both the consumer and producer on cancellation. But let's make the cancellation logic similar to the exec nodes and other sinks by driving the cancellation using the RuntimeState's cancellation flag. Now that CloseConsumer() is only about cancellation, rename it to Cancel() (later we may promote it to DataSink and implement in the data stream sender as well). Testing: - Exhaustive - Minicluster concurrent_select.py stress Change-Id: Ifc75617a253fd43a6122baa4b4dc7aeb1dbe633f Reviewed-on: http://gerrit.cloudera.org:8080/10449 Reviewed-by: Dan Hecht <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M be/src/exec/plan-root-sink.cc M be/src/exec/plan-root-sink.h M be/src/runtime/coordinator.cc M be/src/runtime/fragment-instance-state.cc 4 files changed, 60 insertions(+), 68 deletions(-) Approvals: Dan Hecht: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/10449 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ifc75617a253fd43a6122baa4b4dc7aeb1dbe633f Gerrit-Change-Number: 10449 Gerrit-PatchSet: 8 Gerrit-Owner: Dan Hecht <[email protected]> Gerrit-Reviewer: Bikramjeet Vig <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]>
