hachikuji commented on a change in pull request #11691: URL: https://github.com/apache/kafka/pull/11691#discussion_r799691615
########## File path: clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java ########## @@ -514,12 +512,11 @@ public ProducerConfig(Map<String, Object> props) { } boolean idempotenceEnabled() { - boolean userConfiguredIdempotence = this.originals().containsKey(ENABLE_IDEMPOTENCE_CONFIG); boolean userConfiguredTransactions = this.originals().containsKey(TRANSACTIONAL_ID_CONFIG); - boolean idempotenceEnabled = userConfiguredIdempotence && this.getBoolean(ENABLE_IDEMPOTENCE_CONFIG); - - if (!idempotenceEnabled && userConfiguredIdempotence && userConfiguredTransactions) + boolean idempotenceEnabled = this.getBoolean(ENABLE_IDEMPOTENCE_CONFIG); + if (!idempotenceEnabled && userConfiguredTransactions) throw new ConfigException("Cannot set a " + ProducerConfig.TRANSACTIONAL_ID_CONFIG + " without also enabling idempotence."); + return userConfiguredTransactions || idempotenceEnabled; Review comment: nit: I think the check for `userConfiguredTransactions` is redundant now. ########## File path: docs/upgrade.html ########## @@ -19,6 +19,13 @@ <script id="upgrade-template" type="text/x-handlebars-template"> +<h5><a id="upgrade_320_notable" href="#upgrade_320_notable">Notable changes in 3.2.0</a></h5> + <ul> + <li>Idempotent producer is enabled by default. In 3.0.0 and 3.1.0, in spite of the default value of <code>enable.idempotence</code> is true, + there is a bug that causes the idempotent producer won't be enabled unless user set <code>enable.idempotence</code> to true explicitly. Review comment: How about this? > Idempotence for the producer is enabled by default. In 3.0.0 and 3.1.0, a bug prevented this default from being applied, which meant that idempotence remained disabled unless the user had explicitly set <code>enable.idempotence</code> to true (see <a href="https://issues.apache.org/jira/browse/KAFKA-13598">KAFKA-13598</a> for more details). This issue was fixed and the default is properly applied in 3.0.1, 3.1.1., and 3.2.0. -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org