[jira] [Created] (FLINK-19870) Fix special case when the reuse of exchange causes the deadlock

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-19870) Fix special case when the reuse of exchange causes the deadlock

Shang Yuanchun (Jira)
Caizhi Weng created FLINK-19870:
-----------------------------------

             Summary: 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
             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)