Github user ScrapCodes commented on a diff in the pull request:
https://github.com/apache/spark/pull/12433#discussion_r60173470
--- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
---
@@ -260,7 +260,12 @@ private[spark] class BlockManager(
def waitForAsyncReregister(): Unit = {
val task = asyncReregisterTask
if (task != null) {
- Await.ready(task, Duration.Inf)
+ try {
+ Await.ready(task, Duration.Inf)
--- End diff --
Unrelated to this PR, But waiting for infinite time has a downside, that if
this (main)thread blocks then the app running will appear to have hanged with
no way to know unless one checks the thread dump somehow. However if it is for
finite time duration, an exception is thrown on timeout. In the case
`Duration.Inf` there is no exception ever thrown.
If I am correct about the above, I am not sure why it is being used widely
? I am just asking so I understand if there is some side to it that I do not
understand.
---
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]