You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Caizhi Weng (Jira)" <ji...@apache.org> on 2020/10/29 05:55:00 UTC
[jira] [Updated] (FLINK-19870) Fix special case when the reuse of
exchange causes the deadlock
[ https://issues.apache.org/jira/browse/FLINK-19870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Caizhi Weng updated FLINK-19870:
--------------------------------
Description:
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.
was:
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.
> 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
> Priority: Major
> 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)