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

Moritz Mack edited comment on BEAM-13236 at 11/17/21, 9:08 AM:
---------------------------------------------------------------

Actually, this is more complicated 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;}}


was (Author: mosche):
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: 1h
>  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)

Reply via email to