You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/08/17 06:33:24 UTC

[GitHub] [rocketmq] RongtongJin commented on issue #4829: Suggestion of commit0 method in MappedFile

RongtongJin commented on issue #4829:
URL: https://github.com/apache/rocketmq/issues/4829#issuecomment-1217520381

   @maoyiyong-svg 你好,MappedFile commit方法是在transientStorePoolEnable开启后使用的,其作用时将消息数据从RocketMQ自己管理的堆外内存写入到文件中(后面再由flush线程刷到磁盘),所以代码中出现了writeBuffer中的数据写到fileChannel中,实际上当开启transientStorePoolEnable后,写消息数据都是先写入到writeBuffer而非到内存映射的mappedByteBuffer(若不开启transientStorePoolEnable则是直接写到内存映射文件中)。


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

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