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

    https://github.com/apache/spark/pull/11436#discussion_r54518895
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -852,18 +878,20 @@ private[spark] class BlockManager(
                 Await.ready(replicationFuture, Duration.Inf)
               }
             case _ =>
    -          val remoteStartTime = System.currentTimeMillis
    -          // Serialize the block if not already done
    -          if (bytesAfterPut == null) {
    -            if (valuesAfterPut == null) {
    -              throw new SparkException(
    -                "Underlying put returned neither an Iterator nor bytes! 
This shouldn't happen.")
    +          if (blockWasSuccessfullyStored) {
    --- End diff --
    
    /cc @tdas, the goal of this change is to avoid attempting to replicate 
deserialized, memory-only blocks if their initial cache / persist fails due to 
a lack of memory.
    
    For the purposes of this patch, we need to do this to prevent the iterator 
from being consumed so that it can be passed back to the caller. More 
generally, though, I think that we should have this change to avoid OOMs by 
trying to serialize an entire partition which was too large to be stored.


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