ivoson commented on code in PR #39459:
URL: https://github.com/apache/spark/pull/39459#discussion_r1100268004
##########
core/src/main/scala/org/apache/spark/storage/BlockManager.scala:
##########
@@ -1424,6 +1457,16 @@ private[spark] class BlockManager(
blockStoreUpdater.save()
}
+ // Check whether a rdd block is visible or not.
+ private[spark] def isRDDBlockVisible(blockId: RDDBlockId): Boolean = {
+ // If the rdd block visibility information not available in the block
manager,
+ // asking master for the information.
+ if (blockInfoManager.isRDDBlockVisible(blockId)) {
+ return true
+ }
+ master.isRDDBlockVisible(blockId)
Review Comment:
> > Once the rdd is removed, a broadcast message will be sent to each
BlockManager to clean the cache.
>
> I think the problem in this way is that it introduces the race condition
between the visible cache and the broadcast message.
>
> `master.isRDDBlockVisible(blockId)` shouldn't be frequently called, right?
I thought `blockInfoManager.isRDDBlockVisible(blockId)` would be the most case
for us, no?
With locality scheduler I think `master.isRDDBlockVisible(blockId) ` should
not be frequently called. If the assumption is true, then maybe we don't need
to cache the results.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]