Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/10705#discussion_r53681599
--- Diff: core/src/main/scala/org/apache/spark/CacheManager.scala ---
@@ -46,7 +48,14 @@ private[spark] class CacheManager(blockManager:
BlockManager) extends Logging {
val existingMetrics =
context.taskMetrics().registerInputMetrics(blockResult.readMethod)
existingMetrics.incBytesReadInternal(blockResult.bytes)
- val iter = blockResult.data.asInstanceOf[Iterator[T]]
+ val iter = {
+ val dataIter = blockResult.data.asInstanceOf[Iterator[T]]
+ if (blockResult.readMethod != DataReadMethod.Network) {
+ CompletionIterator[T, Iterator[T]](dataIter,
blockManager.releaseLock(key))
--- End diff --
this warrants a comment; why do we treat reading network blocks
differently? (that the lower level network layer already releases the locks so
we don't want to do it here again)
---
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]