You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2023/01/09 03:37:24 UTC

[GitHub] [rocketmq] ShadowySpirits opened a new pull request, #5840: [ISSUE #5837] Deprecate MessageStore#checkInDiskByConsumeOffset

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

   close #5837


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


[GitHub] [rocketmq] lollipopjin merged pull request #5840: [ISSUE #5837] Deprecate MessageStore#checkInDiskByConsumeOffset

Posted by GitBox <gi...@apache.org>.
lollipopjin merged PR #5840:
URL: https://github.com/apache/rocketmq/pull/5840


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


[GitHub] [rocketmq] codecov-commenter commented on pull request #5840: [ISSUE #5837] Deprecate MessageStore#checkInDiskByConsumeOffset

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

   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/5840?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 [#5840](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (aba9898) into [develop](https://codecov.io/gh/apache/rocketmq/commit/9b3b551a0f5059a6f6b174dccf0d6a9befe1df18?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9b3b551) will **decrease** coverage by `0.04%`.
   > The diff coverage is `40.29%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #5840      +/-   ##
   =============================================
   - Coverage      42.45%   42.41%   -0.05%     
   - Complexity      8230     8233       +3     
   =============================================
     Files           1060     1060              
     Lines          73414    73469      +55     
     Branches        9606     9615       +9     
   =============================================
   - Hits           31171    31161      -10     
   - Misses         38319    38376      +57     
   - Partials        3924     3932       +8     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rocketmq/broker/offset/BroadcastOffsetManager.java](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvb2Zmc2V0L0Jyb2FkY2FzdE9mZnNldE1hbmFnZXIuamF2YQ==) | `90.32% <0.00%> (ø)` | |
   | [...etmq/broker/processor/ConsumerManageProcessor.java](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvcHJvY2Vzc29yL0NvbnN1bWVyTWFuYWdlUHJvY2Vzc29yLmphdmE=) | `10.92% <0.00%> (ø)` | |
   | [...n/java/org/apache/rocketmq/store/MessageStore.java](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL01lc3NhZ2VTdG9yZS5qYXZh) | `0.00% <ø> (ø)` | |
   | [...ketmq/store/plugin/AbstractPluginMessageStore.java](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL3BsdWdpbi9BYnN0cmFjdFBsdWdpbk1lc3NhZ2VTdG9yZS5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...org/apache/rocketmq/store/DefaultMessageStore.java](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0RlZmF1bHRNZXNzYWdlU3RvcmUuamF2YQ==) | `52.91% <32.35%> (-0.80%)` | :arrow_down: |
   | [...pache/rocketmq/store/SelectMappedBufferResult.java](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL1NlbGVjdE1hcHBlZEJ1ZmZlclJlc3VsdC5qYXZh) | `72.72% <50.00%> (-5.06%)` | :arrow_down: |
   | [...ache/rocketmq/store/logfile/DefaultMappedFile.java](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2xvZ2ZpbGUvRGVmYXVsdE1hcHBlZEZpbGUuamF2YQ==) | `44.00% <58.33%> (+0.89%)` | :arrow_up: |
   | [...tmq/remoting/protocol/body/ConsumerConnection.java](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cmVtb3Rpbmcvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3JlbW90aW5nL3Byb3RvY29sL2JvZHkvQ29uc3VtZXJDb25uZWN0aW9uLmphdmE=) | `95.83% <0.00%> (-4.17%)` | :arrow_down: |
   | [...a/org/apache/rocketmq/broker/BrokerController.java](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvQnJva2VyQ29udHJvbGxlci5qYXZh) | `43.29% <0.00%> (-3.43%)` | :arrow_down: |
   | [...ache/rocketmq/proxy/common/ReceiptHandleGroup.java](https://codecov.io/gh/apache/rocketmq/pull/5840?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJveHkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3Byb3h5L2NvbW1vbi9SZWNlaXB0SGFuZGxlR3JvdXAuamF2YQ==) | `64.28% <0.00%> (-3.07%)` | :arrow_down: |
   | ... and [21 more](https://codecov.io/gh/apache/rocketmq/pull/5840?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: commits-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] lollipopjin commented on a diff in pull request #5840: [ISSUE #5837] Deprecate MessageStore#checkInDiskByConsumeOffset

Posted by GitBox <gi...@apache.org>.
lollipopjin commented on code in PR #5840:
URL: https://github.com/apache/rocketmq/pull/5840#discussion_r1064339915


##########
store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:
##########
@@ -1600,13 +1633,29 @@ private long nextOffsetCorrection(long oldOffset, long newOffset) {
         return nextOffset;
     }
 
-    private boolean checkInDiskByCommitOffset(long offsetPy, long maxOffsetPy) {
+    private boolean estimateInMemByCommitOffset(long offsetPy, long maxOffsetPy) {
         long memory = (long) (StoreUtil.TOTAL_PHYSICAL_MEMORY_SIZE * (this.messageStoreConfig.getAccessMessageInMemoryMaxRatio() / 100.0));
-        return (maxOffsetPy - offsetPy) > memory;
+        return (maxOffsetPy - offsetPy) < memory;

Review Comment:
   Here should use <=



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