[
https://issues.apache.org/jira/browse/FLINK-19870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
godfrey he reassigned FLINK-19870:
----------------------------------
Assignee: Caizhi Weng
> Fix special case when the reuse of exchange causes the deadlock
> ---------------------------------------------------------------
>
> Key: FLINK-19870
> URL: https://issues.apache.org/jira/browse/FLINK-19870
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Reporter: Caizhi Weng
> Assignee: Caizhi Weng
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.12.0
>
>
> Currently the reuse of exchange is not considered to be a deadlock because
> although the exec node of an exchange is reused, its underlying
> transformation is not reused. However if this behavior changes a deadlock may
> occur.
> For example, consider the following SQL and its plan:
> {code:sql}
> WITH T1 AS (SELECT a FROM x)
> SELECT * FROM T1
> INNER JOIN T1 AS T2 ON T1.a = T2.a
> {code}
> {code}
> HashJoin(joinType=[InnerJoin], where=[=(a, a0)], select=[a, a0],
> build=[right])
> :- Exchange(distribution=[hash[a]], shuffle_mode=[BATCH], reuse_id=[1])
> : +- Calc(select=[a])
> : +- LegacyTableSourceScan(table=[[default_catalog, default_database, x,
> source: [TestTableSource(a, b, c)]]], fields=[a, b, c])
> +- Reused(reference_id=[1])
> {code}
> The reuse of exchange may cause a deadlock on hash join.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)