CalvinConfluent commented on code in PR #18895:
URL: https://github.com/apache/kafka/pull/18895#discussion_r1955492432
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -561,7 +561,11 @@ public synchronized void
maybeUpdateProducerIdAndEpoch(TopicPartition topicParti
* Set the producer id and epoch atomically.
*/
private void setProducerIdAndEpoch(ProducerIdAndEpoch producerIdAndEpoch) {
- log.info("ProducerId set to {} with epoch {}",
producerIdAndEpoch.producerId, producerIdAndEpoch.epoch);
+ // With TV2, the epoch bump is common and frequent. Only log if it is
at debug level or the producer ID is changed.
+ if (!isTransactional() || !isTransactionV2Enabled ||
+ producerIdAndEpoch.producerId !=
this.producerIdAndEpoch.producerId || log.isDebugEnabled()) {
Review Comment:
You are right, it is strange not to be consistent.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]