dongjoon-hyun commented on code in PR #38983: URL: https://github.com/apache/spark/pull/38983#discussion_r1043761419
########## core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala: ########## @@ -996,6 +996,21 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock) } } + // Delete log files that don't exist in listing database and exceed the configured max age. + Option(fs.listStatus(new Path(logDir))).map(_.toSeq).getOrElse(Nil) + .flatMap { entry => EventLogFileReader(fs, entry) } + .foreach { reader => + try { + listing.read(classOf[LogInfo], reader.rootPath.toString) + } catch { + case _: NoSuchElementException => + if (reader.modificationTime < maxTime) { Review Comment: If this is a `time-based` deletion for unlisted logs, why don't we have at line 980? -- 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: reviews-unsubscr...@spark.apache.org 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