-
Notifications
You must be signed in to change notification settings - Fork 4.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
[BEAM-13236] Properly close kinesis producer on teardown #15955
[BEAM-13236] Properly close kinesis producer on teardown #15955
Conversation
Run Java PreCommit |
R: @aromanenko-dev |
Run Java PostCommit |
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.
@mosche Could you create a new Jira for this fix and update commit message accordingly? Thanks
a22c3fd
to
8abb52f
Compare
@aromanenko-dev done 👍 |
@echauchot Could you take over and merge? |
Actually, this is more complicated than I thought. Closing the PR for now. Per JVM a producer is shared among all Also, if the static instance is reused, producer properties might be silently dropped without notice.
|
@mosche yes no problem, ping me on the new PR I'll do a quick review and merge if @aromanenko-dev is unavailable |
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Outdated
Show resolved
Hide resolved
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Show resolved
Hide resolved
I've fixed initialisation and teardown of the Kinesis producer taking into account that one single producer (daemon) is shared among all writer instances of the same JVM. |
thanks for this fix @mosche ! Reviewing ... |
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 your work @mosche ! And very good catch ! Only some minor changes but mostly LGTM
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Show resolved
Hide resolved
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Outdated
Show resolved
Hide resolved
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Show resolved
Hide resolved
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Show resolved
Hide resolved
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Show resolved
Hide resolved
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Outdated
Show resolved
Hide resolved
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Outdated
Show resolved
Hide resolved
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Outdated
Show resolved
Hide resolved
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Outdated
Show resolved
Hide resolved
18b88e7
to
e93076f
Compare
sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/KinesisIO.java
Outdated
Show resolved
Hide resolved
LGTM. |
Seems that this PR is ready for merge or something is left to do? |
yes @aromanenko-dev, that's ready 👍 |
thanks @aromanenko-dev for merging. I did not have time to give the final LGTM and merge |
thx @aromanenko-dev for doing the merge here! |
Adds a missing
producer.destroy()
toKinesisWriterFn.teardown()
.Also, remove obsolete bugfix that is fixed in recent versions of KPL. See awslabs/amazon-kinesis-producer#34 (comment)
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
ValidatesRunner
compliance status (on master branch)Examples testing status on various runners
Post-Commit SDK/Transform Integration Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.