Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-30434

The non-null check for transactionalIdPrefix is unnecessary in the KafkaWriter constructor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 1.16.0, 1.14.6, 1.15.3
    • None
    • Connectors / Kafka
    • None

    Description

      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.

      Attachments

        1. image-2022-12-16-18-24-14-706.png
          229 kB
          Zhengqi Zhang

        Activity

          People

            Unassigned Unassigned
            Tony Giao Zhengqi Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified