You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "cserwen (via GitHub)" <gi...@apache.org> on 2023/12/13 04:11:06 UTC

[PR] [ISSUE #7651] support to send trace for batchSend [rocketmq]

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

   <!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   <!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
   
   Fixes #7651
   
   ### Brief Description
   Make SendMessageTraceHookImpl support processing batch messages
   
   <!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
   
   ### How Did You Test This Change?
   unit-test
   <!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
   


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

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


Re: [PR] [ISSUE #7651] Support to send trace for batchSend [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7652:
URL: https://github.com/apache/rocketmq/pull/7652#issuecomment-2781745682

   This PR was closed because it has been inactive for 3 days since being marked as stale.


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

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


Re: [PR] [ISSUE #7651] support to send trace for batchSend [rocketmq]

Posted by "leizhiyuan (via GitHub)" <gi...@apache.org>.
leizhiyuan commented on PR #7652:
URL: https://github.com/apache/rocketmq/pull/7652#issuecomment-1886992109

   LGTM
   
   There will be significant improvement in the performance of the trajectory.


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

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


Re: [PR] [ISSUE #7651] support to send trace for batchSend [rocketmq]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7652:
URL: https://github.com/apache/rocketmq/pull/7652#issuecomment-1853255700

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/7652?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: `6 lines` in your changes are missing coverage. Please review.
   > Comparison is base [(`a376fbc`)](https://app.codecov.io/gh/apache/rocketmq/commit/a376fbcdb82e818cfa239da677669f1118e4c40f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 43.19% compared to head [(`f17b5a9`)](https://app.codecov.io/gh/apache/rocketmq/pull/7652?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 43.24%.
   
   | [Files](https://app.codecov.io/gh/apache/rocketmq/pull/7652?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...mq/client/trace/hook/SendMessageTraceHookImpl.java](https://app.codecov.io/gh/apache/rocketmq/pull/7652?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvaG9vay9TZW5kTWVzc2FnZVRyYWNlSG9va0ltcGwuamF2YQ==) | 88.09% | [1 Missing and 4 partials :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/7652?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...g/apache/rocketmq/common/message/MessageBatch.java](https://app.codecov.io/gh/apache/rocketmq/pull/7652?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vbWVzc2FnZS9NZXNzYWdlQmF0Y2guamF2YQ==) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/7652?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #7652      +/-   ##
   =============================================
   + Coverage      43.19%   43.24%   +0.05%     
   - Complexity      9812     9815       +3     
   =============================================
     Files           1165     1165              
     Lines          84461    84483      +22     
     Branches       10964    10969       +5     
   =============================================
   + Hits           36482    36538      +56     
   + Misses         43454    43410      -44     
   - Partials        4525     4535      +10     
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/7652?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


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

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


Re: [PR] [ISSUE #7651] Support to send trace for batchSend [rocketmq]

Posted by "cserwen (via GitHub)" <gi...@apache.org>.
cserwen commented on PR #7652:
URL: https://github.com/apache/rocketmq/pull/7652#issuecomment-2014540135

   @lizhimins Please help me review this code :-D


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

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


Re: [PR] [ISSUE #7651] Support to send trace for batchSend [rocketmq]

Posted by "cserwen (via GitHub)" <gi...@apache.org>.
cserwen commented on code in PR #7652:
URL: https://github.com/apache/rocketmq/pull/7652#discussion_r1500412841


##########
client/src/main/java/org/apache/rocketmq/client/trace/hook/SendMessageTraceHookImpl.java:
##########
@@ -75,24 +97,38 @@ public void sendMessageAfter(SendMessageContext context) {
         }
 
         if (context.getSendResult().getRegionId() == null
-            || !context.getSendResult().isTraceOn()) {
+            || !context.getSendResult().isTraceOn()
+            || StringUtils.isEmpty(context.getSendResult().getMsgId())

Review Comment:
   是的,这里主要是为了兼容性



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

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


Re: [PR] [ISSUE #7651] Support to send trace for batchSend [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7652:
URL: https://github.com/apache/rocketmq/pull/7652#issuecomment-2777250616

   This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR.


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

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


Re: [PR] [ISSUE #7651] Support to send trace for batchSend [rocketmq]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on code in PR #7652:
URL: https://github.com/apache/rocketmq/pull/7652#discussion_r1500180420


##########
client/src/main/java/org/apache/rocketmq/client/trace/hook/SendMessageTraceHookImpl.java:
##########
@@ -75,24 +97,38 @@ public void sendMessageAfter(SendMessageContext context) {
         }
 
         if (context.getSendResult().getRegionId() == null
-            || !context.getSendResult().isTraceOn()) {
+            || !context.getSendResult().isTraceOn()
+            || StringUtils.isEmpty(context.getSendResult().getMsgId())

Review Comment:
   MsgId 是客户端生成的 uniqueKey,OffsetId 是服务端生成的,应该有其一就可以定位消息了



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

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


Re: [PR] [ISSUE #7651] support to send trace for batchSend [rocketmq]

Posted by "cserwen (via GitHub)" <gi...@apache.org>.
cserwen commented on PR #7652:
URL: https://github.com/apache/rocketmq/pull/7652#issuecomment-1888736870

   > LGTM
   > 
   > There will be significant improvement in the performance of the trajectory.
   
   Need to approve it, lol @leizhiyuan 


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

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


Re: [PR] [ISSUE #7651] support to send trace for batchSend [rocketmq]

Posted by "humkum (via GitHub)" <gi...@apache.org>.
humkum commented on PR #7652:
URL: https://github.com/apache/rocketmq/pull/7652#issuecomment-1886384979

   LGTM~


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

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


Re: [PR] [ISSUE #7651] Support to send trace for batchSend [rocketmq]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #7652: [ISSUE #7651] Support to send trace for batchSend
URL: https://github.com/apache/rocketmq/pull/7652


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

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