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 08:47:33 UTC

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

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