You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/04/13 09:20:00 UTC
[jira] [Commented] (SPARK-38867) Avoid OOM when bufferedPlan has a lot of duplicate keys in SortMergeJoin codegen
[ https://issues.apache.org/jira/browse/SPARK-38867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17521567#comment-17521567 ]
Apache Spark commented on SPARK-38867:
--------------------------------------
User 'mcdull-zhang' has created a pull request for this issue:
https://github.com/apache/spark/pull/36178
> Avoid OOM when bufferedPlan has a lot of duplicate keys in SortMergeJoin codegen
> --------------------------------------------------------------------------------
>
> Key: SPARK-38867
> URL: https://issues.apache.org/jira/browse/SPARK-38867
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.2.1
> Reporter: mcdull_zhang
> Priority: Minor
>
> WholeStageCodegenExec is wrapped in BufferedRowIterator.
> BufferedRowIterator uses a LinkedList to hold the output of WholeStageCodegenExec.
> When the parent of SortMergeJoin cannot codegen, SortMergeJoin needs to append the output to this LinkedList.
> SortMergeJoin processes a record in streamedPlan each time. If all records in bufferedPlan can match this record, all records in bufferedPlan will be saved in LinkedList, resulting in OOM.
> The above situation is very common in our internal use, so it is best to add a configuration to the codegen code. If there are enough pieces in the LinkedList, stop SortMergeJoin and let the parent consume it first.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org