ulysses-you commented on a change in pull request #34919:
URL: https://github.com/apache/spark/pull/34919#discussion_r773746786



##########
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:
       It should not happen that we delete info here and  
`mergeApplicationListing` task together since the conflicts have been evicted 
by `isProcessing` and `notStale`, so I think it should be fine just leave it.




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

Reply via email to