dongjoon-hyun commented on code in PR #59792:
URL: https://github.com/apache/spark/pull/59792#discussion_r4380917462


##########
core/src/main/scala/org/apache/spark/TaskContextImpl.scala:
##########
@@ -444,7 +444,16 @@ private[spark] class TaskContextImpl(
         // SPARK-56330: Do not propagate to the executor kill / RPC thread; 
record the aggregate
         // failure for the task (not the first listener exception only).
         logError(log"Exception(s) in TaskInterruptListener(s) after task was 
interrupted", e)
-        markTaskFailed(e)
+        try {
+          markTaskFailed(e)
+        } catch {
+          case t: TaskCompletionListenerException =>

Review Comment:
   Thanks, you are right. `invokeListeners` wraps any `Throwable` of a failure 
listener, so this catch also records a listener's fatal error as suppressed. 
That matches how the interrupt listeners and every other listener failure are 
treated, so I kept the behavior and reworded the description as suggested.
   



##########
core/src/main/scala/org/apache/spark/TaskContextImpl.scala:
##########
@@ -444,7 +444,16 @@ private[spark] class TaskContextImpl(
         // SPARK-56330: Do not propagate to the executor kill / RPC thread; 
record the aggregate
         // failure for the task (not the first listener exception only).
         logError(log"Exception(s) in TaskInterruptListener(s) after task was 
interrupted", e)

Review Comment:
   Thanks. This is not specific to the failure listener case: base behaves the 
same, and the trigger is a logging failure rather than a listener failure, so I 
would keep it out of this PR.
   
   It also isn't limited to this `logError`. The one in the 
`invokeTaskInterruptListeners` loop escapes `markInterrupted` the same way and 
skips the remaining interrupt listeners, and the one in `invokeListeners` 
additionally leaves `listenerInvocationThread` set. Guarding only this call 
would leave the symptom reachable, so I'd like to handle the logging calls 
together in a separate JIRA, like #59794 does for the pre-completion listeners.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to