Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/7927#discussion_r36202856
--- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
---
@@ -592,8 +592,14 @@ private[spark] class BlockManager(
val locations = Random.shuffle(master.getLocations(blockId))
for (loc <- locations) {
logDebug(s"Getting remote block $blockId from $loc")
- val data = blockTransferService.fetchBlockSync(
- loc.host, loc.port, loc.executorId,
blockId.toString).nioByteBuffer()
+ val data = try {
+ blockTransferService.fetchBlockSync(
+ loc.host, loc.port, loc.executorId,
blockId.toString).nioByteBuffer()
+ } catch {
+ case e: Throwable =>
+ logWarning(s"Exception during getting remote block $blockId from
$loc", e)
--- End diff --
I think the point is that: since you are expecting a `IOException` (or
whatever it is) when one of the remotes goes down, than you should only catch
that exception. If we get some other weird random exception, we should
probably still throw it, since it might be some bigger problem.
Also I don't think simply ignoring the exception is right. If you only get
an exception from one location, but then another location is fine, sure, just
forget the exception. But what if you get an exception from all locations?
Then you should still throw an exception. You could do something like what is
done in
[`askWithRetry`](https://github.com/apache/spark/blob/d702d53732b44e8242448ce5302738bd130717d8/core/src/main/scala/org/apache/spark/rpc/RpcEndpointRef.scala#L96).
---
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]