tillrohrmann commented on a change in pull request #12636:
URL: https://github.com/apache/flink/pull/12636#discussion_r442329559



##########
File path: 
flink-core/src/main/java/org/apache/flink/configuration/HistoryServerOptions.java
##########
@@ -99,6 +99,13 @@
                        .withDescription("Enable HTTPs access to the 
HistoryServer web frontend. This is applicable only when the" +
                                " global SSL flag security.ssl.enabled is set 
to true.");
 
+       public static final ConfigOption<Integer> HISTORY_SERVER_RETAINED_JOBS =
+               key("historyserver.archive.retained-jobs")
+                       .defaultValue(-1)
+                       .withDescription(String.format("The maximum number of 
jobs to retain in each archive directory" +
+                               " defined by `%s`. If set to `-1`(default) or 
negative, there is no limit to the number of archives" +
+                               " to keep in the directories and the cache. If 
set to `0`, no archives are kept.", HISTORY_SERVER_ARCHIVE_DIRS.key()));

Review comment:
       Hmm, wouldn't `historyserver.archive.retained-jobs = 0` mean that the 
history server does not show any jobs? I mean it does not make a lot of sense 
for the user to configure this value tbh. In order to avoid the user 
misconfiguring this value one could fail if one sees that the user configured 
it with `0`.
   
   It would be different if we would still unpack the found archives. But in 
the current state, we skip this part due to the `continue;` in the if body. 
Moreover, `cleanupJobsBeyondSizeLimit` should then only delete the archives.
   
   Looking at the complications introduced by removing the archives right away 
but keeping the unpacked job REST responses when setting 
`historyserver.archive.retained-jobs = 0`, I would suggest to not support this 
in the first version.
   
   What do you think @danmagyar?




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


Reply via email to