Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/22371#discussion_r216369925
--- Diff:
core/src/main/scala/org/apache/spark/shuffle/IndexShuffleBlockResolver.scala ---
@@ -138,13 +154,22 @@ private[spark] class IndexShuffleBlockResolver(
mapId: Int,
lengths: Array[Long],
dataTmp: File): Unit = {
+ val mapLocks = shuffleIdToLocks.get(shuffleId)
+ require(mapLocks != null, "Shuffle should be registered to
IndexShuffleBlockResolver first")
+ val lock = mapLocks.synchronized {
--- End diff --
in most cases, you'll still have contention on this lock, right, its just a
much smaller critical section? As the usual case is for multiple tasks in the
same executor to be for the same stage.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]