gengliangwang commented on code in PR #46309: URL: https://github.com/apache/spark/pull/46309#discussion_r1585591097
########## core/src/main/scala/org/apache/spark/executor/Executor.scala: ########## @@ -638,10 +638,12 @@ private[spark] class Executor( val freedMemory = taskMemoryManager.cleanUpAllAllocatedMemory() if (freedMemory > 0 && !threwException) { - val errMsg = s"Managed memory leak detected; size = $freedMemory bytes, $taskName" if (conf.get(UNSAFE_EXCEPTION_ON_MEMORY_LEAK)) { + val errMsg = s"Managed memory leak detected; size = $freedMemory bytes, $taskName" Review Comment: I think we can still unify both and use `errMsg.message` in the `internalError` -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org