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 2021/01/12 02:47:02 UTC

[GitHub] [rocketmq] horizonzy commented on issue #2563: [Bug] The judge logic maybe exist problem in org.apache.rocketmq.store.MappedFile#commit0

horizonzy commented on issue #2563:
URL: https://github.com/apache/rocketmq/issues/2563#issuecomment-758358346


   感谢回复。
   我看这里的逻辑判断应该是去校验有没有达到最小缓存页的数据吧。
   现在的比较`if (writePos - lastCommittedPosition > commitLeastPages)`. writePos - lastCommittedPosition这个结果是还没有提交的byte长度,后面commitLeastPages单位是页数,这两个来判断的单位都不是同一个吧。
   
   这个commitLeastPages的值有可能有两种,要么是0,要么是messageStore的`commitCommitLogLeastPages`参数,默认为4嘛。0的话倒是无所谓,但是如果是4的话,那里commit比较的单位都是不一致的。
   
   ![image](https://user-images.githubusercontent.com/22524871/104262856-684a7c80-54c3-11eb-82b0-d98d780a13d0.png)
   
   
   


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

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