maropu commented on a change in pull request #29869:
URL: https://github.com/apache/spark/pull/29869#discussion_r495874746
##########
File path: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
##########
@@ -274,8 +274,36 @@ private[spark] class DAGScheduler(
accumUpdates: Seq[AccumulatorV2[_, _]],
metricPeaks: Array[Long],
taskInfo: TaskInfo): Unit = {
+ // It may cause heavy full GC problem if some heavy external accumulators
keep in memory.
+ // We update these heavy accumulators before they entering into Spark
listener event loop.
+ val (heavyAccumUpdates, otherAccumUpdates) = accumUpdates.partition { acc
=>
+ acc.name.exists(_.startsWith(ExternalHeavyAccumulator.HEAVY_PREFIX))
+ }
+ heavyAccumUpdates.foreach { updates =>
+ val id = updates.id
Review comment:
This code part looks almost the same with `updateAccumulators`, so could
we share it between them?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]