[ https://issues.apache.org/jira/browse/FLINK-30434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhengqi Zhang closed FLINK-30434. --------------------------------- Resolution: Not A Problem > The non-null check for transactionalIdPrefix is unnecessary in the > KafkaWriter constructor > ------------------------------------------------------------------------------------------ > > Key: FLINK-30434 > URL: https://issues.apache.org/jira/browse/FLINK-30434 > Project: Flink > Issue Type: Bug > Components: Connectors / Kafka > Affects Versions: 1.16.0, 1.14.6, 1.15.3 > Reporter: Zhengqi Zhang > Priority: Major > Attachments: image-2022-12-16-18-24-14-706.png > > Original Estimate: 24h > Remaining Estimate: 24h > > The non-null check for transactionalIdPrefix is unnecessary in the > KafkaWriter constructor, especially when EXACTLY_ONCE semantics are not used. > First, when EXACTLY_ONCE semantics are used, a non-null check has been > performed for transactionalIdPrefix in KafkaSinkBuilder. > Secondly, although the default value "kafka-sink" has been assigned to > transactionalIdPrefix in KafkaSinkBuilder, if the user uses the > setTransactionalIdPrefix method to set it to null, the construction method of > KafkaWriter will throw an exception, even if the user does not use > EXACTLY_ONCE semantics at this time. > Obviously, we should allow transactionalIdPrefix to be null when EXACTLY_ONCE > semantics are not used. > !image-2022-12-16-18-24-14-706.png|width=692,height=461! -- This message was sent by Atlassian Jira (v8.20.10#820010)