You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "guyinyou (via GitHub)" <gi...@apache.org> on 2024/11/26 08:56:10 UTC

[PR] [ISSUE #8988] Support dispatchBehindMilliseconds [rocketmq]

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

   <!-- 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 #8988 
   
   ### Brief Description
   
   <!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
   
   ### How Did You Test This Change?
   
   <!-- 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 #8988] Support dispatchBehindMilliseconds [rocketmq]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin merged PR #8989:
URL: https://github.com/apache/rocketmq/pull/8989


-- 
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 #8988] Support dispatchBehindMilliseconds [rocketmq]

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

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/8989?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `35.71429%` with `9 lines` in your changes missing coverage. Please review.
   > Project coverage is 47.67%. Comparing base [(`fc22830`)](https://app.codecov.io/gh/apache/rocketmq/commit/fc2283008b82d7b06d7d6054121ea6a074ebea9f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`08a7544`)](https://app.codecov.io/gh/apache/rocketmq/commit/08a7544c8451efbd74a9cae8fcd98c940add9084?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/rocketmq/pull/8989?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...org/apache/rocketmq/store/DefaultMessageStore.java](https://app.codecov.io/gh/apache/rocketmq/pull/8989?src=pr&el=tree&filepath=store%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fstore%2FDefaultMessageStore.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0RlZmF1bHRNZXNzYWdlU3RvcmUuamF2YQ==) | 38.46% | [7 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8989?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...ketmq/store/plugin/AbstractPluginMessageStore.java](https://app.codecov.io/gh/apache/rocketmq/pull/8989?src=pr&el=tree&filepath=store%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fstore%2Fplugin%2FAbstractPluginMessageStore.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL3BsdWdpbi9BYnN0cmFjdFBsdWdpbk1lc3NhZ2VTdG9yZS5qYXZh) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8989?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    #8989      +/-   ##
   =============================================
   + Coverage      47.63%   47.67%   +0.03%     
   - Complexity     11762    11772      +10     
   =============================================
     Files           1304     1304              
     Lines          91197    91210      +13     
     Branches       11715    11717       +2     
   =============================================
   + Hits           43442    43481      +39     
   + Misses         42371    42345      -26     
     Partials        5384     5384              
   ```
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/8989?dropdown=coverage&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 #8988] Support dispatchBehindMilliseconds [rocketmq]

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

   > `System.currentTimeMillis()` can be affected by changes to the system time, such as those caused by daylight saving time or NTP time server sync. Should we use `System.nanoTime()` instead?
   
   Your concern is correct, but the calculation of dispatchBehindMilliseconds needs to be calculated based on the message storage time stored in the commitlog and cannot be converted to nanoTime.


-- 
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 #8988] Support dispatchBehindMilliseconds [rocketmq]

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


##########
store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:
##########
@@ -2793,6 +2797,7 @@ public void notifyMessageArriveIfNecessary(DispatchRequest dispatchRequest) {
     class ReputMessageService extends ServiceThread {
 
         protected volatile long reputFromOffset = 0;
+        protected volatile long currentReputTimestamp = 0;

Review Comment:
   it is ok



-- 
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 #8988] Support dispatchBehindMilliseconds [rocketmq]

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


##########
store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:
##########
@@ -2793,6 +2797,7 @@ public void notifyMessageArriveIfNecessary(DispatchRequest dispatchRequest) {
     class ReputMessageService extends ServiceThread {
 
         protected volatile long reputFromOffset = 0;
+        protected volatile long currentReputTimestamp = 0;

Review Comment:
   Should the initial value be set to the current time? If it's set to 0, would it retrieve an unexpectedly large value before being assigned?



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