You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Moritz Mack (Jira)" <ji...@apache.org> on 2021/11/17 08:57:00 UTC

[jira] [Commented] (BEAM-13236) Properly close kinesis producer on teardown

    [ https://issues.apache.org/jira/browse/BEAM-13236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17445016#comment-17445016 ] 

Moritz Mack commented on BEAM-13236:
------------------------------------

Actually, this is more broken than I thought. I've closed the PR for now.

Per JVM a producer is shared among allĀ {{{}KinesisWriterFn{}}}s. Sharing producers absolutely makes sense, nevertheless this absolutely leaks. On teardown the shared(!) producer reference is unset, though it might still be required by another unfinished bundle running on the same JVM.

Also, if the static instance is reused, producer properties might be silently dropped without notice.

{{      private static transient IKinesisProducer producer;}}

> Properly close kinesis producer on teardown
> -------------------------------------------
>
>                 Key: BEAM-13236
>                 URL: https://issues.apache.org/jira/browse/BEAM-13236
>             Project: Beam
>          Issue Type: Task
>          Components: io-java-kinesis
>            Reporter: Moritz Mack
>            Assignee: Moritz Mack
>            Priority: P2
>              Labels: aws, ios, kinesis
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Each KPL producer uses it's own native deamon, so properly cleaning up once not used anymore is important.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)