ShadowySpirits opened a new issue, #5837:
URL: https://github.com/apache/rocketmq/issues/5837

   link to #5754 
   
   We work on introducing tiered storage for RocketMQ so that the semantics of 
MessageStore#checkInDiskByConsumeOffset is no longer appropriate.
   
   
https://github.com/apache/rocketmq/blob/00da3e7249d2339717d96f7ea2ab8e4a2fd4242c/store/src/main/java/org/apache/rocketmq/store/MessageStore.java#L379-L387
   
   This issue will add two new interfaces in MessageStore:
   
   ```java
       /**
        * Check if the given message is in the page cache.
        *
        * @param topic         topic.
        * @param queueId       queue ID.
        * @param consumeOffset consume queue offset.
        * @return true if the message is in page cache; false otherwise.
        */
       boolean checkInMemByConsumeOffset(final String topic, final int queueId, 
long consumeOffset, int batchSize);
   
       /**
        * Check if the given message is in disk.
        *
        * @param topic         topic.
        * @param queueId       queue ID.
        * @param consumeOffset consume queue offset.
        * @return true if the message is in disk; false otherwise.
        */
       boolean checkInDiskByConsumeOffset(final String topic, final int 
queueId, long consumeOffset);
   ```
   
   - `checkInMemByConsumeOffset` function use 
[mincore](https://man7.org/linux/man-pages/man2/mincore.2.html) syscall to 
determine whether message data are resident in memory accurately.
   - `checkInDiskByConsumeOffset` function check if the message data is in the 
local disk.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to