mridulm commented on code in PR #53406:
URL: https://github.com/apache/spark/pull/53406#discussion_r2611624445


##########
core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala:
##########
@@ -178,6 +178,13 @@ class HadoopMapReduceCommitProtocol(
     val taskAttemptContext = new 
TaskAttemptContextImpl(jobContext.getConfiguration, taskAttemptId)
     committer = setupCommitter(taskAttemptContext)
     committer.setupJob(jobContext)
+    try {
+      val fs = stagingDir.getFileSystem(jobContext.getConfiguration)
+      fs.deleteOnExit(stagingDir)

Review Comment:
   For streaming jobs, given their really long duration and large number of 
commits, we will keep accumulating the `deleteOnExit` metadata to be tracked - 
and eventually OOM.
   I am assuming that is what @dongjoon-hyun is referring to - and I agree it 
is a risk.
   
   At a minimum, we can derisk it by calling `cancelDeleteOnExit` for 
successful commits.
   
   Btw, please do not catch `Throwable`



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