HeartSaVioR commented on a change in pull request #28904:
URL: https://github.com/apache/spark/pull/28904#discussion_r471883048



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/CompactibleFileStreamLog.scala
##########
@@ -173,37 +177,64 @@ abstract class CompactibleFileStreamLog[T <: AnyRef : 
ClassTag](
   override def purge(thresholdBatchId: Long): Unit = throw new 
UnsupportedOperationException(
     s"Cannot purge as it might break internal state.")
 
+  /**
+   * Apply function on all entries in the specific batch. The method will throw
+   * FileNotFoundException if the metadata log file doesn't exist.
+   *
+   * NOTE: This doesn't fail early on corruption. The caller should handle the 
exception

Review comment:
       `IllegalStateException` is not the only exception this method can throw. 
It can also throw `IOException` as it deals with file, and also depends on 
`deserializeEntry`.
   
   I think the type of exception won't affect what caller should do. Caller may 
want to deal with FNFE specifically, but still do the same for others, and even 
for FNFE it's safer to follow the guide on NOTE.




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

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

Reply via email to