-
Notifications
You must be signed in to change notification settings - Fork 13.9k
[FLINK-17170][kinesis] Fix deadlock during stop-with-savepoint. #15826
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
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 0dfd34c (Sat Aug 28 11:18:27 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. DetailsThe 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:
|
dannycranmer
left a comment
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.
The fix LGTM. We now have 2x Kinesis IT that duplicate setup. I would suggest we either:
- Move the test from e2e test module to this module, or
- Create a follow up Jira to capture the tidy up
...-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisITCase.java
Show resolved
Hide resolved
...kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/KinesaliteContainer.java
Outdated
Show resolved
Hide resolved
dannycranmer
left a comment
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.
LGTM
|
@flinkbot run azure |
2 similar comments
|
@flinkbot run azure |
|
@flinkbot run azure |
|
Build was green when disabling FLINK-22566, so merging without disable commit. |
…nesis. This testcontainer will be used in an ITCase in the next commit. Also move system properties required for test into pom.xml.
During stop-with-savepoint cancel is called under lock in legacy sources. Thus, if the fetcher is trying to emit a record at the same time, it cannot obtain the checkpoint lock. This behavior leads to a deadlock while cancel awaits the termination of the fetcher. The fix is to mostly rely on the termination inside the run method. As a safe-guard, close also awaits termination where close is always caused without lock.
What is the purpose of the change
During stop-with-savepoint cancel is called under lock in legacy sources. Thus, if the fetcher is trying to emit a record at the same time, it cannot obtain the checkpoint lock. This behavior leads to a deadlock while cancel awaits the termination of the fetcher.
Brief change log
Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no)Documentation