gengliangwang commented on a change in pull request #34919:
URL: https://github.com/apache/spark/pull/34919#discussion_r773708451
##########
File path:
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
##########
@@ -583,11 +583,13 @@ private[history] class FsHistoryProvider(conf: SparkConf,
clock: Clock)
//
// Only entries with valid applications are cleaned up here. Cleaning up
invalid log
// files is done by the periodic cleaner task.
- val stale = listing.view(classOf[LogInfo])
- .index("lastProcessed")
- .last(newLastScanTime - 1)
- .asScala
- .toList
+ val stale = listing.synchronized {
+ listing.view(classOf[LogInfo])
+ .index("lastProcessed")
+ .last(newLastScanTime - 1)
+ .asScala
+ .toList
+ }
Review comment:
on second thought, shall we put line 593 to line 600 in to
`listing.synchronized {}` as well ?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]