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

    https://github.com/apache/spark/pull/10076#discussion_r46395903
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/ExternalBlockStore.scala ---
    @@ -110,7 +110,7 @@ private[spark] class ExternalBlockStore(blockManager: 
BlockManager, executorId:
             val byteBuffer = bytes.duplicate()
             byteBuffer.rewind()
             externalBlockManager.get.putBytes(blockId, byteBuffer)
    -        val size = bytes.limit()
    +        val size = bytes.remaining()
    --- End diff --
    
    This is an interesting one. The original `bytes` is reset to position 0 and 
put, so it means that the size that was put really is `bytes.limit` or 
`byteBuffer.remaining` (before it's put). I think this might have to be 
adjusted but I'm also not sure why `bytes` is returned here instead of what was 
put into the block manager. Maybe it's really assumed position is 0, but then 
why `rewind`?


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