Hello Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
https://gerrit.cloudera.org/25095
to look at the new patch set (#3).
Change subject: PROTOTYPE IMPALA-15656: Don't wait for unopened CTE consumers
in Release()
......................................................................
PROTOTYPE IMPALA-15656: Don't wait for unopened CTE consumers in Release()
LocalExchanger::Release(), called when a CTE producer closes, waited
until every consumer linked to it had called CloseConsumer(), and did
not check for cancellation. A consumer only registers with the
exchanger at the end of CTEConsumerNode::Open(), so a consumer whose
Open() failed or was never called never closed it. The producer's
fragment instance then hung in Close() and kept its memory: after a
consumer fragment instance failed, and even without a failure when a
UNION child that is a CTE consumer was never opened.
CTEConsumerNode::Close() now registers and closes a consumer that did
not open the exchanger. Once the query is cancelled, Release() only
waits for the consumers that opened the exchanger and then frees all
batches. A consumer that opens it after that gets no exchanger and
returns no rows.
Testing:
- Added LocalExchangerTest for Release() with and without
cancellation. No test runs CTEConsumerNode::Close().
- Ran LocalExchangerTest, SchedulerTest and AdmissionControllerTest.
- TPC-DS SF10000, PLANNER=CALCITE, CTE_THRESHOLD=1,
COMPUTE_PROCESSING_COST=true, 3 executors with 64 vCPUs, one run
each: with IMPALA-15655 and this change, memory was released within
83 s after each of 5 memory failures. On master, the CTE producers
of a failed q14_2 still held 108.7-119.5 GB per host 20 minutes
later.
Change-Id: Ic2e2f4090bb2270a33be396d759e435cd8defefa
Assisted-by: Claude Opus 5.5 (Claude Code)
---
M be/src/exec/cte-consumer-node.cc
M be/src/exec/cte-consumer-node.h
M be/src/exec/cte-producer-node.cc
M be/src/runtime/CMakeLists.txt
A be/src/runtime/local-exchanger-test.cc
M be/src/runtime/local-exchanger.cc
M be/src/runtime/local-exchanger.h
7 files changed, 199 insertions(+), 29 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/95/25095/3
--
To view, visit https://gerrit.cloudera.org/25095
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic2e2f4090bb2270a33be396d759e435cd8defefa
Gerrit-Change-Number: 25095
Gerrit-PatchSet: 3
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>