aljoscha commented on a change in pull request #9759: 
[FLINK-14169][history-server] Cleanup expired jobs from history server
URL: https://github.com/apache/flink/pull/9759#discussion_r335049733
 
 

 ##########
 File path: 
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
 ##########
 @@ -223,17 +267,40 @@ public void run() {
                                                        }
                                                }
                                        }
-                                       if (updateOverview) {
-                                               
updateJobOverview(webOverviewDir, webDir);
-                                               for (int x = 0; x < 
numFetchedArchives; x++) {
-                                                       
numArchivedJobs.countDown();
-                                               }
-                                       }
                                }
+
+                               if (!jobsToRemove.isEmpty() && 
processArchiveDeletion) {
+                                       
operations.addAll(removeDeletedJobs(jobsToRemove));
+                               }
+                               if (!operations.isEmpty()) {
+                                       updateJobOverview(webOverviewDir, 
webDir);
+                               }
+                               
operations.forEach(jobArchiveEventListener::accept);
                        } catch (Exception e) {
                                LOG.error("Critical failure while 
fetching/processing job archives.", e);
                        }
                }
+
+               private List<JobArchiveEvent> removeDeletedJobs(Set<String> 
jobsToRemove) {
 
 Review comment:
   Maybe `cleanupExpiredJobs`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to