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 02:32:48 UTC

[GitHub] [rocketmq] zhiliatom opened a new pull request, #5245: [ISSUE #4658] remove redundant logic

zhiliatom opened a new pull request, #5245:
URL: https://github.com/apache/rocketmq/pull/5245

   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   close #4658 
   
   
   


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


[GitHub] [rocketmq] codecov-commenter commented on pull request #5245: [ISSUE #4658] remove redundant logic

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #5245:
URL: https://github.com/apache/rocketmq/pull/5245#issuecomment-1272216185

   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/5245?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#5245](https://codecov.io/gh/apache/rocketmq/pull/5245?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a81aeb6) into [develop](https://codecov.io/gh/apache/rocketmq/commit/d0b28117dc0c527f5abcde75cb6a8db0667e5404?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d0b2811) will **increase** coverage by `0.06%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head a81aeb6 differs from pull request most recent head 9d5bc45. Consider uploading reports for the commit 9d5bc45 to get more accurate results
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #5245      +/-   ##
   =============================================
   + Coverage      43.13%   43.19%   +0.06%     
   - Complexity      7788     7807      +19     
   =============================================
     Files            998      998              
     Lines          69461    69459       -2     
     Branches        9174     9173       -1     
   =============================================
   + Hits           29959    30003      +44     
   + Misses         35729    35688      -41     
   + Partials        3773     3768       -5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/5245?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...mq/client/impl/producer/DefaultMQProducerImpl.java](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9wcm9kdWNlci9EZWZhdWx0TVFQcm9kdWNlckltcGwuamF2YQ==) | `45.16% <0.00%> (+0.10%)` | :arrow_up: |
   | [...rocketmq/common/message/MessageClientIDSetter.java](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vbWVzc2FnZS9NZXNzYWdlQ2xpZW50SURTZXR0ZXIuamF2YQ==) | `71.42% <0.00%> (-2.39%)` | :arrow_down: |
   | [...ache/rocketmq/broker/client/ConsumerGroupInfo.java](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvY2xpZW50L0NvbnN1bWVyR3JvdXBJbmZvLmphdmE=) | `68.46% <0.00%> (-0.91%)` | :arrow_down: |
   | [...mq/store/ha/autoswitch/AutoSwitchHAConnection.java](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL2F1dG9zd2l0Y2gvQXV0b1N3aXRjaEhBQ29ubmVjdGlvbi5qYXZh) | `70.16% <0.00%> (-0.81%)` | :arrow_down: |
   | [...che/rocketmq/test/lmq/benchmark/BenchLmqStore.java](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC9sbXEvYmVuY2htYXJrL0JlbmNoTG1xU3RvcmUuamF2YQ==) | `51.48% <0.00%> (-0.50%)` | :arrow_down: |
   | [...he/rocketmq/client/impl/consumer/ProcessQueue.java](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9Qcm9jZXNzUXVldWUuamF2YQ==) | `61.46% <0.00%> (-0.46%)` | :arrow_down: |
   | [...ava/org/apache/rocketmq/filter/util/BitsArray.java](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CaXRzQXJyYXkuamF2YQ==) | `59.82% <0.00%> (ø)` | |
   | [...cketmq/broker/processor/PopBufferMergeService.java](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL1BvcEJ1ZmZlck1lcmdlU2VydmljZS5qYXZh) | `37.44% <0.00%> (ø)` | |
   | [...apache/rocketmq/store/timer/TimerMessageStore.java](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL3RpbWVyL1RpbWVyTWVzc2FnZVN0b3JlLmphdmE=) | `54.18% <0.00%> (+0.09%)` | :arrow_up: |
   | [.../apache/rocketmq/logging/inner/LoggingBuilder.java](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bG9nZ2luZy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvbG9nZ2luZy9pbm5lci9Mb2dnaW5nQnVpbGRlci5qYXZh) | `63.92% <0.00%> (+0.31%)` | :arrow_up: |
   | ... and [14 more](https://codecov.io/gh/apache/rocketmq/pull/5245/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [rocketmq] aaron-ai merged pull request #5245: [ISSUE #4658] remove redundant logic

Posted by GitBox <gi...@apache.org>.
aaron-ai merged PR #5245:
URL: https://github.com/apache/rocketmq/pull/5245


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


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

Posted by GitBox <gi...@apache.org>.
aaron-ai commented on code in PR #5245:
URL: https://github.com/apache/rocketmq/pull/5245#discussion_r990581116


##########
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) {
+                        } else {
                             log.debug("Used new check API in transaction message");

Review Comment:
   ```suggestion
                               log.warn("transactionListener is null, producerGroup={}", group);
   ```



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


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

Posted by GitBox <gi...@apache.org>.
aaron-ai commented on code in PR #5245:
URL: https://github.com/apache/rocketmq/pull/5245#discussion_r990583154


##########
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("TransactionCheckListener is null, used new check API, producerGroup={}", group);

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



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