Hello Tim Armstrong, Bikramjeet Vig,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/10449
to look at the new patch set (#4).
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
---
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, 58 insertions(+), 60 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/49/10449/4
--
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: newpatchset
Gerrit-Change-Id: Ifc75617a253fd43a6122baa4b4dc7aeb1dbe633f
Gerrit-Change-Number: 10449
Gerrit-PatchSet: 4
Gerrit-Owner: Dan Hecht <[email protected]>
Gerrit-Reviewer: Bikramjeet Vig <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>