Skip to content

Conversation

@dmvk
Copy link
Member

@dmvk dmvk commented Jan 11, 2022

@flinkbot
Copy link
Collaborator

flinkbot commented Jan 11, 2022

CI report:

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

@flinkbot
Copy link
Collaborator

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 899e78f (Tue Jan 11 17:59:14 UTC 2022)

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.

Details
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

final String firstCheckpoint =
cluster.getMiniCluster().triggerCheckpoint(firstJobId).get();
cluster.getClusterClient().cancel(firstJobId).get();
CommonTestUtils.waitForJobStatus(
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't fully understand why we need it here. if we clone JobGraph then everything works perfectly fine even without this waiting. It seems for me that the awaiting on cancel's future is enough to be sure that the next submit with the new JobGraph will be successful. Did I miss some rare race condition?

Copy link
Member Author

Choose a reason for hiding this comment

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

This would fix the test as well, even without cloning the JobGraph, because after this point the mutations wouldn't affect the dispatcher.

Copy link
Contributor

Choose a reason for hiding this comment

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

Since you cloned the object inside of submit. Do I understand correctly, that we can avoid waitForJobStatus? (I understand that it also makes sense, but I just don't want to overcomplicate the code if it is not necessary)

@dmvk
Copy link
Member Author

dmvk commented Jan 14, 2022

@dawidwys Thanks for the review. I've addressed your comments, PTAL

cluster.getClusterClient().submitJob(jobGraph).get();
CommonTestUtils.waitForAllTaskRunning(cluster.getMiniCluster(), jobID1, false);
final JobID firstJobId = new JobID();
final JobGraph firstJobGraph = InstantiationUtil.clone(jobGraph);
Copy link
Contributor

Choose a reason for hiding this comment

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

As I understand, you don't need clone here anymore

final String firstCheckpoint =
cluster.getMiniCluster().triggerCheckpoint(firstJobId).get();
cluster.getClusterClient().cancel(firstJobId).get();
CommonTestUtils.waitForJobStatus(
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you cloned the object inside of submit. Do I understand correctly, that we can avoid waitForJobStatus? (I understand that it also makes sense, but I just don't want to overcomplicate the code if it is not necessary)

Copy link
Contributor

@dawidwys dawidwys left a comment

Choose a reason for hiding this comment

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

+1 % I agree with @akalash we should remove the clone from SavepointITCase

…eWithNoClaim by implicitly cloning the JobGraphs submitted into the MiniCluster.
@dmvk
Copy link
Member Author

dmvk commented Jan 20, 2022

Needs another rebase due to conflict in MiniCluster

Copy link
Contributor

@akalash akalash left a comment

Choose a reason for hiding this comment

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

LGTM

@dawidwys
Copy link
Contributor

Shall I merge it @dmvk ?

@dmvk
Copy link
Member Author

dmvk commented Jan 20, 2022

@dawidwys yes please, I was waiting for CI to get green to ping you :)

@dawidwys dawidwys merged commit 00856d0 into apache:master Jan 20, 2022
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.

5 participants