argoyal2212 commented on code in PR #29008:
URL: https://github.com/apache/flink/pull/29008#discussion_r4519037515


##########
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/history/HistoryServerArchiveFetcher.java:
##########
@@ -229,23 +328,46 @@ void scanArchives(
                         continue;
                     }
 
+                    if (cachedRetainedJobs > 0
+                            && fileOrderedIndexOnModifiedTime > 
cachedRetainedJobs) {
+                        // the remote archive stays, only evict what an 
earlier scan cached
+                        if 
(cachedArchivesPerRefreshDirectory.get(refreshDir).contains(archiveId)) {
+                            archivesToEvictLocally
+                                    .computeIfAbsent(refreshDir, ignored -> 
new HashSet<>())
+                                    .add(archiveId);
+                        }
+                        continue;
+                    }
+
                     if (fetch) {
-                        fetchArchive(refreshDir, archiveId, archivePath, 
archiveLoadMode, events);
+                        synchronized (localStateLock) {

Review Comment:
   Good catch, job requests no longer take the global lock. Scan reads, deletes 
and overview rebuilds now run under per job locks and the shared lock only 
guards in memory bookkeeping, with tests showing requests complete while a scan 
read or delete is blocked.



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

Reply via email to