You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/10/08 03:43:46 UTC

[GitHub] [rocketmq] lizhimins commented on a diff in pull request #5245: [ISSUE #4658] remove redundant logic

lizhimins commented on code in PR #5245:
URL: https://github.com/apache/rocketmq/pull/5245#discussion_r990582745


##########
client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:
##########
@@ -348,11 +348,9 @@ public void run() {
                     try {
                         if (transactionCheckListener != null) {
                             localTransactionState = transactionCheckListener.checkLocalTransactionState(message);
-                        } else if (transactionListener != null) {
-                            log.debug("Used new check API in transaction message");
-                            localTransactionState = transactionListener.checkLocalTransaction(message);
                         } else {
-                            log.warn("CheckTransactionState, pick transactionListener by group[{}] failed", group);
+                            log.warn("transactionListener is null, producerGroup={}", group);

Review Comment:
   ```suggestion
                               log.warn("TransactionCheckListener is null, used new check API, producerGroup={}", group);
   ```



##########
client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:
##########
@@ -348,11 +348,9 @@ public void run() {
                     try {
                         if (transactionCheckListener != null) {
                             localTransactionState = transactionCheckListener.checkLocalTransactionState(message);
-                        } else if (transactionListener != null) {
-                            log.debug("Used new check API in transaction message");
-                            localTransactionState = transactionListener.checkLocalTransaction(message);
                         } else {
-                            log.warn("CheckTransactionState, pick transactionListener by group[{}] failed", group);
+                            log.warn("transactionListener is null, producerGroup={}", group);

Review Comment:
   The log information maybe not correct. The transactionCheckListener is empty. It‘s new API



-- 
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: dev-unsubscribe@rocketmq.apache.org

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