-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-17914][hs] Keep archives if listStatus fails #17411
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 98aa685 (Mon Oct 04 11:57:57 UTC 2021) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for creating this PR @zentol. The changes look good to me. One way for testing this change is to write a probabilistic test. You could make the HistoryServerArchiveFetcher.run()
callable from the outside. Then you run it once. Then you run it again with a concurrent deletion. Then we could assert that not all entries in the refresh directory have been deleted.
If FileSystem#listStatus threw an exception then all archives from that directory were removed, because we did not remove the contained jobs from the set of jobs to remove. It should be fine to keep these archives around, because such failures should only be temporary.
Moves the fetcher scheduling to history server and merge HistoryServerArchiveFetcher and JobArchiveFetcherTask. This way the HistoryServer takes care of everything required for a long-running application, while the fetcher is entirely focused on a single fetch.
Fixes an issue where the HistoryServer was wiping archives if the listing of archives failed (e.g., due to a concurrent deletion of an archive).
This could result in all locally cached archived being deleted.
If this occurs now we keep all archives and defer judgement to the next fetch attempt.
This PR does not add a test because it is difficult to replicate.