Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17012#discussion_r103359940
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/HDFSBackedStateStoreProvider.scala
 ---
    @@ -274,7 +274,9 @@ private[state] class HDFSBackedStateStoreProvider(
       private def commitUpdates(newVersion: Long, map: MapType, tempDeltaFile: 
Path): Path = {
         synchronized {
           val finalDeltaFile = deltaFile(newVersion)
    -      if (!fs.rename(tempDeltaFile, finalDeltaFile)) {
    +      // Renaming a file atop an existing one fails on HDFS, see
    --- End diff --
    
    Could you add our discussion to the comment? Such as
    ```
          // scalastyle:off
          // Renaming a file atop an existing one fails on HDFS
          // 
(http://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/filesystem/filesystem.html).
          // Hence we should either skip the rename step or delete the target 
file. Because deleting the
          // target file will beak speculation, skipping the rename step is the 
only choice. It's still
          // semantically correct because Structured Streaming requires 
rerunning a batch should
          // generate the same output. (SPARK-19677)
          // scalastyle:on
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to