Github user jiangxb1987 commented on a diff in the pull request:
https://github.com/apache/spark/pull/18099#discussion_r118396407
--- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
---
@@ -454,14 +454,20 @@ private[spark] class BlockManager(
case Some(info) =>
val level = info.level
logDebug(s"Level for block $blockId is $level")
+ val taskAttemptId =
Option(TaskContext.get()).map(_.taskAttemptId())
--- End diff --
This is getting the `taskAttemptId` from the main thread, in case a
TaskContext is not propagated properly to all child threads for the task, we
would fail in getting the `taskAttemptId` in `BlockInfoManager`, see the test
case added in this PR.
---
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]