[
https://issues.apache.org/jira/browse/SPARK-54930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hyukjin Kwon resolved SPARK-54930.
----------------------------------
Fix Version/s: 4.2.0
Resolution: Fixed
Issue resolved by pull request 53708
[https://github.com/apache/spark/pull/53708]
> Remove redundant _accumulatorRegistry.clear() call in worker.py
> ---------------------------------------------------------------
>
> Key: SPARK-54930
> URL: https://issues.apache.org/jira/browse/SPARK-54930
> Project: Spark
> Issue Type: Improvement
> Components: PySpark
> Affects Versions: 4.1.0
> Reporter: Yicong Huang
> Assignee: Yicong Huang
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.2.0
>
>
> In {{worker.py}}, {{_accumulatorRegistry.clear()}} is called twice with no
> accumulator-modifying code in between:
> {code:python}
> shuffle.MemoryBytesSpilled = 0
> shuffle.DiskBytesSpilled = 0
> _accumulatorRegistry.clear() # first call
> setup_spark_files(infile)
> setup_broadcasts(infile)
> _accumulatorRegistry.clear() # second call (redundant)
> {code}
> Neither {{setup_spark_files}} nor {{setup_broadcasts}} adds anything to
> {{_accumulatorRegistry}}, so the first {{clear()}} is redundant.
> This happened because SPARK-3463 (2014) added the first {{clear()}} and
> SPARK-3030 (2014) added the second one. When SPARK-44533 (2023) refactored
> the code to extract {{setup_spark_files}} and {{setup_broadcasts}}, both
> {{clear()}} calls were preserved even though they became redundant.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]