You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/05/14 13:31:14 UTC

[GitHub] [flink] aljoscha commented on a change in pull request #12151: [FLINK-16383] Set close = true in monitor/lock scope in KafkaProducer

aljoscha commented on a change in pull request #12151:
URL: https://github.com/apache/flink/pull/12151#discussion_r425137936



##########
File path: flink-connectors/flink-connector-kafka-0.11/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/FlinkKafkaProducer.java
##########
@@ -190,17 +192,19 @@ public void sendOffsetsToTransaction(Map<TopicPartition, OffsetAndMetadata> offs
 
 	@Override
 	public void close() {
-		closed = true;
 		synchronized (producerClosingLock) {
 			kafkaProducer.close();
+			LOG.debug("Closed internal KafkaProducer {}. Stacktrace: {}", System.identityHashCode(this), Joiner.on("\n").join(Thread.currentThread().getStackTrace()));

Review comment:
       Yes, that's why I left it there but I agree that we should set good examples? So I should put an `if (LOG.isDebugEnabled()) {}` around it?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org