You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/03/24 00:57:20 UTC

[GitHub] [kafka] RivenSun2 opened a new pull request #11940: KAFKA-13689: optimize the log output of logUnused method

RivenSun2 opened a new pull request #11940:
URL: https://github.com/apache/kafka/pull/11940


    optimize the log output of logUnused method.


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] guozhangwang commented on pull request #11940: KAFKA-13689: optimize the log output of logUnused method

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on pull request #11940:
URL: https://github.com/apache/kafka/pull/11940#issuecomment-1077031424


   Hi @RivenSun2 I think we also want to call `ignore` when certain producer feature is disabled as well?


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] guozhangwang commented on a change in pull request #11940: KAFKA-13689: optimize the log output of logUnused method

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on a change in pull request #11940:
URL: https://github.com/apache/kafka/pull/11940#discussion_r834502144



##########
File path: clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
##########
@@ -530,6 +530,9 @@ private TransactionManager configureTransactionState(ProducerConfig config,
                 log.info("Instantiated a transactional producer.");
             else
                 log.info("Instantiated an idempotent producer.");
+        } else {
+            // ignore unretrieved configurations related to producer transaction
+            config.ignore(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG);

Review comment:
       Ah I see, all good then.




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] RivenSun2 commented on pull request #11940: KAFKA-13689: optimize the log output of logUnused method

Posted by GitBox <gi...@apache.org>.
RivenSun2 commented on pull request #11940:
URL: https://github.com/apache/kafka/pull/11940#issuecomment-1076963317


   Hi @guozhangwang 
   please help to review PR when available.
   Thanks.


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] guozhangwang commented on a change in pull request #11940: KAFKA-13689: optimize the log output of logUnused method

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on a change in pull request #11940:
URL: https://github.com/apache/kafka/pull/11940#discussion_r833912567



##########
File path: clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
##########
@@ -530,6 +530,9 @@ private TransactionManager configureTransactionState(ProducerConfig config,
                 log.info("Instantiated a transactional producer.");
             else
                 log.info("Instantiated an idempotent producer.");
+        } else {
+            // ignore unretrieved configurations related to producer transaction
+            config.ignore(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG);

Review comment:
       Should we also ignore `TRANSACTIONAL_ID_CONFIG` as well?




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] RivenSun2 commented on a change in pull request #11940: KAFKA-13689: optimize the log output of logUnused method

Posted by GitBox <gi...@apache.org>.
RivenSun2 commented on a change in pull request #11940:
URL: https://github.com/apache/kafka/pull/11940#discussion_r833923860



##########
File path: clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
##########
@@ -530,6 +530,9 @@ private TransactionManager configureTransactionState(ProducerConfig config,
                 log.info("Instantiated a transactional producer.");
             else
                 log.info("Instantiated an idempotent producer.");
+        } else {
+            // ignore unretrieved configurations related to producer transaction
+            config.ignore(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG);

Review comment:
       It is called at the beginning of the initialization method of KafkaProducer: 
    `String transactionalId = config.getString(ProducerConfig.TRANSACTIONAL_ID_CONFIG);`
   
   do we need to ignore transactional.id here?




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] RivenSun2 commented on pull request #11940: KAFKA-13689: optimize the log output of logUnused method

Posted by GitBox <gi...@apache.org>.
RivenSun2 commented on pull request #11940:
URL: https://github.com/apache/kafka/pull/11940#issuecomment-1077069535


   @guozhangwang 
   Of course, I briefly sort out where KafkaClient calls `AbstractConfig.getBoolean` method.
   Only the `KafkaProducer.configureTransactionState` method needs to be processed.
   `transactional.id` and `retry.backoff.ms` are retrieved elsewhere.
   


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] guozhangwang merged pull request #11940: KAFKA-13689: optimize the log output of logUnused method

Posted by GitBox <gi...@apache.org>.
guozhangwang merged pull request #11940:
URL: https://github.com/apache/kafka/pull/11940


   


-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org