This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch release-1.8
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 4c4dc3d0e72d0b5277af9440e4a3168a88555403
Author: Chesnay Schepler <ches...@apache.org>
AuthorDate: Tue Oct 8 11:27:34 2019 +0200

    [FLINK-14337][hs] Only mark archives as processed on success
---
 .../runtime/webmonitor/history/HistoryServerArchiveFetcher.java      | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
 
b/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
index 6f52cef..79add41f 100644
--- 
a/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
+++ 
b/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java
@@ -163,7 +163,7 @@ class HistoryServerArchiveFetcher {
                                                                refreshDir, 
jobID, iae);
                                                        continue;
                                                }
-                                               if (cachedArchives.add(jobID)) {
+                                               if 
(!cachedArchives.contains(jobID)) {
                                                        try {
                                                                for 
(ArchivedJson archive : FsJobArchivist.getArchivedJsons(jobArchive.getPath())) {
                                                                        String 
path = archive.getPath();
@@ -200,11 +200,10 @@ class HistoryServerArchiveFetcher {
                                                                                
fw.flush();
                                                                        }
                                                                }
+                                                               
cachedArchives.add(jobID);
                                                                
numFetchedArchives++;
                                                        } catch (IOException e) 
{
                                                                
LOG.error("Failure while fetching/processing job archive for job {}.", jobID, 
e);
-                                                               // Make sure we 
attempt to fetch the archive again
-                                                               
cachedArchives.remove(jobID);
                                                                // Make sure we 
do not include this job in the overview
                                                                try {
                                                                        
Files.delete(new File(webOverviewDir, jobID + JSON_FILE_ENDING).toPath());

Reply via email to