Skip to content

Conversation

rkhachatryan
Copy link
Contributor

What is the purpose of the change

Showcase the usage of API instead of latches to wait for vertices to start.
This should prevent bugs when not all tasks are running at the time of taking a savepoint.

@rkhachatryan rkhachatryan marked this pull request as draft May 7, 2021 21:15
@flinkbot
Copy link
Collaborator

flinkbot commented May 7, 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 1532861 (Sat Aug 28 12:09:12 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

@rkhachatryan rkhachatryan changed the title [WIP][FLINK-22481][tests] Wait for vertices to using API [WIP][FLINK-22067][tests] Wait for vertices to using API May 7, 2021
@flinkbot
Copy link
Collaborator

flinkbot commented May 7, 2021

CI report:

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

@rkhachatryan rkhachatryan changed the title [WIP][FLINK-22067][tests] Wait for vertices to using API [WIP][FLINK-22067][tests] Wait for vertices to start using API May 9, 2021

public <T extends WaitingFunction> String takeSavepoint(
T waitingFunction, Function<T, StreamExecutionEnvironment> jobGraphFactory) {
T waitingFunction /*todo: inline and delete class?*/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it can be safely inlined then +1. The more we can simplify the better.

}

private void waitForAllRunningOrSomeTerminal(JobID jobID) throws Exception {
while (true) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have some sort of timeout? Or are we happy to let the CI kill the process after some time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to rely on CI timeout (this topic was recently discussed here).

@rkhachatryan rkhachatryan marked this pull request as ready for review May 10, 2021 21:13
@rkhachatryan rkhachatryan changed the title [WIP][FLINK-22067][tests] Wait for vertices to start using API [FLINK-22067][tests] Wait for vertices to start using API May 10, 2021
@rkhachatryan
Copy link
Contributor Author

rkhachatryan commented May 10, 2021

Thanks for reviewing @sjwiesman.
I've removed WaitingFunction, WaitingWindowAssigner and unnecessary now arguments, PTAL.

edit:
CI failures unrelated (FLINK-22520, FLINK-20329).

@rkhachatryan rkhachatryan merged commit 7399bb4 into apache:master May 18, 2021
@rkhachatryan rkhachatryan deleted the f22481 branch May 18, 2021 07:15
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