Danny Cranmer created FLINK-21228:
-------------------------------------

             Summary: [Kinesis][Producer] Deadlock in KinesisProducer
                 Key: FLINK-21228
                 URL: https://issues.apache.org/jira/browse/FLINK-21228
             Project: Flink
          Issue Type: Bug
          Components: Connectors / Kinesis
    Affects Versions: 1.12.1
            Reporter: Danny Cranmer


*Background*
Application sink failed and resulted in:
- Indefinite backpressure being applied
- Exception never thrown causing job to fail

Application running with:

{code:java}
flinkKinesisProducer.setQueueLimit(1);
flinkKinesisProducer.setFailOnError(true); 
{code}

- {{KinesisProducer}} is waiting for queue to empty before sending the next 
record 
([code|https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisProducer.java#L303])
- KPL ran out of memory, which raised an error, however this is processed async 
([code|https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisProducer.java#L275])
- {{KinesisProducer}} would have rethrown the error and restarted the job, 
however operator stuck in an infinite loop enforcing the queue limit (which 
never clears) 
([code|https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisProducer.java#L306])

*Proposal*
- {{checkAndPropagateAsyncError()}} while enforcing queue limit in 
{{enforceQueueLimit()}} to break deadlock




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to