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

    https://github.com/apache/spark/pull/5886#discussion_r29648841
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala ---
    @@ -186,13 +186,13 @@ private[history] class FsHistoryProvider(conf: 
SparkConf, clock: Clock)
         try {
           val statusList = Option(fs.listStatus(new Path(logDir))).map(_.toSeq)
             .getOrElse(Seq[FileStatus]())
    -      var newLastModifiedTime = lastModifiedTime
           val logInfos: Seq[FileStatus] = statusList
             .filter { entry =>
               try {
                 getModificationTime(entry).map { time =>
    -              newLastModifiedTime = math.max(newLastModifiedTime, time)
    -              time >= lastModifiedTime
    +              val fileName = entry.getPath.getName
    +              val oldLastModifiedTime = 
lastModifiedTimes.getOrElse(fileName, -1L)
    +              time > oldLastModifiedTime
    --- End diff --
    
    I think technically this has to be `>=` since you might have an update that 
occurred in the same millisecond. This is very unlikely. But is there harm in 
reprocessing logs in this code? does it have to guarantee a log isn't read 
twice?


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