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

    https://github.com/apache/spark/pull/2792#discussion_r18995941
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterActor.scala ---
    @@ -455,18 +455,21 @@ private[spark] class BlockManagerInfo(
     
         updateLastSeenMs()
     
    -    if (_blocks.containsKey(blockId)) {
    -      // The block exists on the slave already.
    -      val originalLevel: StorageLevel = _blocks.get(blockId).storageLevel
    -
    -      if (originalLevel.useMemory) {
    -        _remainingMem += memSize
    -      }
    -    }
    -
         if (storageLevel.isValid) {
    -      /* isValid means it is either stored in-memory, on-disk or 
on-Tachyon.
    -       * But the memSize here indicates the data size in or dropped from 
memory,
    +      // isValid means it is either stored in-memory, on-disk or 
on-Tachyon.
    +       
    +      if (_blocks.containsKey(blockId)) {
    +        // The block exists on the slave already.
    +        val blockStatus: BlockStatus = _blocks.get(blockId)
    +        val originalLevel: StorageLevel = blockStatus.storageLevel
    +        val originalMemSize: Long = blockStatus.memSize
    --- End diff --
    
    The old code seems a little more concise


---
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