Github user zsxwing commented on the pull request:
https://github.com/apache/spark/pull/887#issuecomment-44238025
> onReceiveCallback appears to be fully immutable
Actually, `onReceiveCallback` is not immutable. It's set to
`BlockManagerWorker.onBlockMessageReceive`:
https://github.com/apache/spark/blob/17f3075bc4aa8cbed165f7b367f70e84b1bc8db9/core/src/main/scala/org/apache/spark/storage/BlockManagerWorker.scala#L34
`BlockManagerWorker` contains a reference to `BlockManager`, which is
mutable and has not finished the initialization when
BlockManagerWorker.scala#L34 is called.
So `onReceiveCallback` is not a pure function.
I also report an issue here
https://issues.apache.org/jira/browse/SPARK-1934 about "this escape".
---
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.
---