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

    https://github.com/apache/spark/pull/4827#discussion_r26870986
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -535,9 +535,10 @@ private[spark] class BlockManager(
                   /* We'll store the bytes in memory if the block's storage 
level includes
                    * "memory serialized", or if it should be cached as objects 
in memory
                    * but we only requested its serialized bytes. */
    -              val copyForMemory = ByteBuffer.allocate(bytes.limit)
    -              copyForMemory.put(bytes)
    -              memoryStore.putBytes(blockId, copyForMemory, level)
    +              memoryStore.putBytes(blockId, bytes.limit) {
    --- End diff --
    
    could you add a // comment here that links to this JIRA? Otherwise it's not 
clear why we need to do this lazily.


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