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

    https://github.com/apache/spark/pull/6990#discussion_r33760055
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -833,8 +833,10 @@ private[spark] class BlockManager(
         logDebug("Put block %s locally took %s".format(blockId, 
Utils.getUsedTimeMs(startTimeMs)))
     
         // Either we're storing bytes and we asynchronously started 
replication, or we're storing
    -    // values and need to serialize and replicate them now:
    -    if (putLevel.replication > 1) {
    +    // values and need to serialize and replicate them now.
    +    // Should not replicate the block if its StorageLevel is 
StorageLevel.NONE or
    +    // putting it to local is failed.
    +    if (!putBlockInfo.isFailed && putLevel.replication > 1) {
    --- End diff --
    
    thanks @tdas for your view. I agree with what you said . Just for my 
understanding , for RDD Partitions which are cached can also be evicted from 
memory by BlockManager which is more often the case in Spark . But for Spark 
Streaming case , the blocks are generating at much faster rate and cause large 
number of unwanted blocks to be stored in remote memory if local store failed. 
If Receiver do retry those blocks (which normally the case ) and retry is 
success , there will be multiple copies of same blocks will exists across 
nodes. This seems to me little unwanted .
    Not sure why you called de-optimizing existing code path, as for RDD 
partitions to be dropped from memory can happen anytime during its life cycle. 


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