attilapiros commented on a change in pull request #33628:
URL: https://github.com/apache/spark/pull/33628#discussion_r770907179



##########
File path: 
core/src/main/scala/org/apache/spark/storage/DiskBlockObjectWriter.scala
##########
@@ -272,6 +274,25 @@ private[spark] class DiskBlockObjectWriter(
     file
   }
 
+  /**
+   * Reverts write metrics that haven't been committed yet and delete the file 
held
+   * by current `DiskBlockObjectWriter`. Callers should invoke this function 
when there
+   * are runtime exceptions in file writing process and the file is no longer 
needed.
+   */
+  def closeAndDelete(): Unit = {

Review comment:
       We should test this in `DiskBlockObjectWriterSuite` and I think the 
metrics was wrong and needs to be fixed. 




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