argoyal2212 opened a new pull request, #29015:
URL: https://github.com/apache/flink/pull/29015

   ## What is the purpose of the change
   
   History server archival currently writes an archive to 
`jobmanager.archive.fs.dir` for every job that reaches a globally terminal 
state (FINISHED, CANCELED, FAILED). For clusters running many short-lived batch 
jobs, this creates a large number of archive files even though most users 
primarily care about investigating failed jobs.
   
   This PR adds an opt-in option to only archive jobs that reached the `FAILED` 
state, reducing the number of files written to the archive directory.
   
   ## Brief change log
   
   - Added `jobmanager.archive.only-failed-jobs` (default `false`, backward 
compatible) to `JobManagerOptions`.
   - `Dispatcher#jobReachedTerminalState` now skips calling the 
`HistoryServerArchivist` for non-`FAILED` terminal jobs when the option is 
enabled. The `submitFailedJob` path is unaffected since it always represents a 
`FAILED` job.
   - Regenerated 
`docs/layouts/shortcodes/generated/job_manager_configuration.html`.
   
   ## Verification
   
   - Added 
`DispatcherResourceCleanupTest#testNotArchivingFinishedJobToHistoryServerWhenOnlyFailedJobsConfigured`,
 asserting a FINISHED job is not archived when the option is enabled, while 
cleanup/termination still proceed normally.
   - Ran `DispatcherResourceCleanupTest` (18/18 passed) and `DispatcherTest` 
(48/48 passed).
   
   ## Does this pull request potentially affect one of the following parts
   
   - Dependencies (does it add or upgrade a dependency): no
   - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no (new `ConfigOption`, backward compatible, default 
preserves existing behavior)
   - The serializers: no
   - The runtime per-record code paths (performance sensitive): no
   - Anything that affects deployment or recovery: no
   - The S3 file system connector: no
   
   ## Documentation
   
   - Does this pull request introduce a new feature? Yes
   - If yes, how is the feature documented? Documented via the generated 
configuration docs (`ConfigOption` javadoc + regenerated HTML).
   


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