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

 ##########
 File path: 
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
 ##########
 @@ -223,17 +228,42 @@ public void run() {
                                                        }
                                                }
                                        }
-                                       if (updateOverview) {
-                                               
updateJobOverview(webOverviewDir, webDir);
-                                               for (int x = 0; x < 
numFetchedArchives; x++) {
-                                                       
numArchivedJobs.countDown();
-                                               }
-                                       }
                                }
+
+                               if (!jobsToRemove.isEmpty()) {
+                                       
operations.addAll(removeDeletedJobs(jobsToRemove));
 
 Review comment:
   The original version implemented this approach but it fails test. There was 
race condition between producing of event and refreshing content of jobs 
overview.
   
   In this approach are events produced after update of jobs overview thus 
tests pass.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to