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


   > 感谢回复。
   > 我看这里的逻辑判断应该是去校验有没有达到最小缓存页的数据吧。
   > 现在的比较`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)
   
   赞同你的观点。不过这行代码还是有人提了bug之后的修改,可以看看这个 issue: 
https://github.com/apache/rocketmq/pull/2346


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