Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/22094 )
Change subject: IMPALA-13533: Calcite CTE backend ...................................................................... Patch Set 28: (2 comments) http://gerrit.cloudera.org:8080/#/c/22094/25/be/src/runtime/local-exchanger.h File be/src/runtime/local-exchanger.h: http://gerrit.cloudera.org:8080/#/c/22094/25/be/src/runtime/local-exchanger.h@67 PS25, Line 67: : /// Closes exchanger for consumer_index. After this call, no more Pull() calls : /// are allowed for this consumer. : void Close(int32_t consumer_index); : Mentioning producer / consumer in the function name would be nice, e.g. CloseProducer()/CloseCunsumer() http://gerrit.cloudera.org:8080/#/c/22094/25/be/src/runtime/local-exchanger.cc File be/src/runtime/local-exchanger.cc: http://gerrit.cloudera.org:8080/#/c/22094/25/be/src/runtime/local-exchanger.cc@26 PS25, Line 26: consumer_count_ > A consumer that closes without fulling consuming the results - from query c What I meant is that it calls CTEConsumerNode::Close() and afterwards a producer calls LocalExchanger::Push(). In this case during Close() the new element was not there, so the producer can't decrease its consumers_left. Checked the Starrocks implementation, it seems to care about this via _opened_source_number https://github.com/StarRocks/starrocks/blob/6e7e350d45f3cd30ab4965af0ddda19dab141630/be/src/exec/pipeline/exchange/multi_cast_local_exchange.cpp#L78 Btw I am curious if there is any test currently that could trigger this. -- To view, visit http://gerrit.cloudera.org:8080/22094 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I48f16d495d4b37be97e6a913f0eb5b94d70e199a Gerrit-Change-Number: 22094 Gerrit-PatchSet: 28 Gerrit-Owner: Michael Smith <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Steve Carlin <[email protected]> Gerrit-Comment-Date: Mon, 22 Dec 2025 17:52:08 +0000 Gerrit-HasComments: Yes
