FrankYang0529 commented on code in PR #19362:
URL: https://github.com/apache/kafka/pull/19362#discussion_r2028331394


##########
tests/kafkatest/services/verifiable_producer.py:
##########
@@ -147,9 +147,10 @@ def _worker(self, idx, node):
         if self.enable_idempotence:
             self.logger.info("Setting up an idempotent producer")
             producer_prop_file += "\nmax.in.flight.requests.per.connection=5\n"
-            producer_prop_file += "\nretries=1000000\n"
             producer_prop_file += "\nenable.idempotence=true\n"
-        elif self.retries is not None:
+            if self.retries is None:
+                producer_prop_file += "\nretries=1000000\n"
+        if self.retries is not None:

Review Comment:
   In retries document 
https://kafka.apache.org/documentation/#producerconfigs_retries, it mentions
   ```
   Enabling idempotence requires this config value to be greater than 0.
   If conflicting configurations are set and idempotence is not explicitly 
enabled, idempotence is disabled.
   ```
   
   I think we should add assertion to `__int__` to make sure if 
enable_idempotence is true, then retries should not be zero.



-- 
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

Reply via email to