pnowojski commented on a change in pull request #6989: [FLINK-10455][Kafka Tx]
Close transactional producers in case of failure and termination
URL: https://github.com/apache/flink/pull/6989#discussion_r230408448
##########
File path:
flink-connectors/flink-connector-kafka-0.11/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer011.java
##########
@@ -671,6 +672,9 @@ public void close() throws FlinkKafka011Exception {
}
// make sure we propagate pending errors
checkErroneous();
+ pendingTransactions().values().forEach(transaction ->
Review comment:
It seems strange why order of those lines matters. It might indicate that
our `internal.FlinkKafkaProducer#flushNewPartitions` method is broken, since
that's where our test is deadlocking.
I briefly checked
`org.apache.kafka.clients.producer.internals.TransactionManager#beginCommit`
(which our `flushNewPartitions` is partially mimicking), and maybe the problem
is that we are skipping `TransactionManager#maybeFailWithError` call? Could you
invoke this method in our `flushNewPartitions` and see whether the deadlock is
gone?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services