Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10705#discussion_r53747525
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -995,21 +1003,10 @@ private[spark] class BlockManager(
           data: () => Either[Array[Any], ByteBuffer]): Unit = {
     
         logInfo(s"Dropping block $blockId from memory")
    -    val info = blockInfo.get(blockId)
    -
    -    // If the block has not already been dropped
    -    if (info != null) {
    -      info.synchronized {
    -        // required ? As of now, this will be invoked only for blocks 
which are ready
    -        // But in case this changes in future, adding for consistency sake.
    -        if (!info.waitForReady()) {
    -          // If we get here, the block write failed.
    -          logWarning(s"Block $blockId was marked as failure. Nothing to 
drop")
    -          return
    -        } else if (blockInfo.asScala.get(blockId).isEmpty) {
    -          logWarning(s"Block $blockId was already dropped.")
    -          return
    -        }
    +    blockInfoManager.lockForWriting(blockId) match {
    --- End diff --
    
    I haven't forgotten about this comment; this is going to be addressed as 
part of cleanup to move the lock acquisition out of this method so that it 
takes place higher up the call chain.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to