gaborgsomogyi commented on a change in pull request #25333: 
[SPARK-28597][SS]Spark streaming terminated when close meta data log error
URL: https://github.com/apache/spark/pull/25333#discussion_r310489827
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/HDFSMetadataLog.scala
 ##########
 @@ -133,7 +140,12 @@ class HDFSMetadataLog[T <: AnyRef : 
ClassTag](sparkSession: SparkSession, path:
           s"Multiple streaming queries are concurrently using $path", e)
       case e: Throwable =>
         output.cancel()
-        throw e
+        if (retryCount > metaDataNumRetries) {
+          throw new IOException(
+            s"Failed to write meta data log after retry $metaDataNumRetries 
count", e)
+        } else {
+          writeBatchToFileWithRetries(metadata, path, retryCount + 1)
 
 Review comment:
   I'm pretty sure this recursive call is not needed.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to