yikf commented on PR #37493:
URL: https://github.com/apache/spark/pull/37493#issuecomment-1213389785

   emm... i guess whether you are confusing 
[tryLog](https://github.com/apache/spark/blob/f8d51b9940b5f1f7c1f37693b10931cbec0a4741/core/src/main/scala/org/apache/spark/util/Utils.scala#L2059)
 with 
[tryLogNonFatalError](https://github.com/apache/spark/blob/f8d51b9940b5f1f7c1f37693b10931cbec0a4741/core/src/main/scala/org/apache/spark/util/Utils.scala#L1468)?
 (probably, Sorry if I got this wrong).
   
    1\)   tryLog  catches ControlThrowable will throw it otherwise 
logs an error, not catches NonFatal and logs an error.
    2\)   tryLogNonFatalError catches NonFatal and logs an error.
   
   This pr aims to replace existing duplicate code with `tryLog`(not 
tryLogNonFatalError) , trylog is consistent with existing logic(catch  
`ControlThrowable` will throw it otherwise logs an error), so that seems ok.
   
   and if  `tryLogNonFatalError`(catches NonFatal and logs an error), the 
semantics possibly slightly different with currently logic.
    1\)    if ControlThrowable, both will be thrown (both consistent).
    2\)    if VirtualMachineError | ThreadDeath | 
InterruptedException | LinkageError, tryLogNonFatalError will throw these 
throwable, but currently logic log an error only (this may be the answer to 
your question).
   >  just trying to think if there was any specific reason it should behave 
differently
   
    3\)    if others, both log an error (both consistent).


-- 
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