Skip to content

Commit de700d3

Browse files
committed
[SPARK-3709] Executors don't always report broadcast block removal properly back to the driver
The problem was that the 2nd argument in RemoveBroadcast is not tellMaster! It is "removeFromDriver". Basically when removeFromDriver is not true, we don't report broadcast block removal back to the driver, and then other executors mistakenly think that the executor would still have the block, and try to fetch from it. cc @tdas Author: Reynold Xin <[email protected]> Closes #2588 from rxin/debug and squashes the following commits: 6dab2e3 [Reynold Xin] Don't log random messages. f430686 [Reynold Xin] Always report broadcast removal back to master. 2a13f70 [Reynold Xin] iii
1 parent 6b79bfb commit de700d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/src/main/scala/org/apache/spark/network/nio/NioBlockTransferService.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,6 @@ final class NioBlockTransferService(conf: SparkConf, securityManager: SecurityMa
200200
val buffer = blockDataManager.getBlockData(blockId).orNull
201201
logDebug("GetBlock " + blockId + " used " + Utils.getUsedTimeMs(startTimeMs)
202202
+ " and got buffer " + buffer)
203-
buffer.nioByteBuffer()
203+
if (buffer == null) null else buffer.nioByteBuffer()
204204
}
205205
}

core/src/main/scala/org/apache/spark/storage/BlockManagerSlaveActor.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class BlockManagerSlaveActor(
5858
SparkEnv.get.shuffleManager.unregisterShuffle(shuffleId)
5959
}
6060

61-
case RemoveBroadcast(broadcastId, tellMaster) =>
61+
case RemoveBroadcast(broadcastId, _) =>
6262
doAsync[Int]("removing broadcast " + broadcastId, sender) {
63-
blockManager.removeBroadcast(broadcastId, tellMaster)
63+
blockManager.removeBroadcast(broadcastId, tellMaster = true)
6464
}
6565

6666
case GetBlockStatus(blockId, _) =>

0 commit comments

Comments
 (0)