Skip to content
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

Merged
merged 4 commits into from
Oct 18, 2021
Merged

Conversation

zentol
Copy link
Contributor

@zentol zentol commented Oct 4, 2021

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.

@flinkbot
Copy link
Collaborator

flinkbot commented Oct 4, 2021

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 98aa685 (Mon Oct 04 11:57:57 UTC 2021)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

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 commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Oct 4, 2021

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Copy link
Contributor

@tillrohrmann tillrohrmann left a 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.
@zentol zentol merged commit fa7b573 into apache:master Oct 18, 2021
@zentol zentol deleted the 17914 branch October 20, 2021 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants