xiaoyaofawai opened a new issue #3099:
URL: https://github.com/apache/rocketmq/issues/3099


   I think the jedgment '**writePos - lastCommittedPosition > 
commitLeastPages**'  in the method 'commit0' of class 'MappedFile' is 
meaningless in the version 4.8.0.
   
![image](https://user-images.githubusercontent.com/12688996/118827344-dd551500-b8ee-11eb-8a71-6772ef8435a0.png)
   As you can see. 'writePos - lastCommittedPosition' represents the amount of 
data that has not been committed, it's in byte. but  commitLeastPages 
represents the least pages(OS_PAGE) should be committed. 'commitLeastPages ' 
has been determined in method ‘isAbleToCommit’ whether it meets the condition. 
so '**writePos - lastCommittedPosition > commitLeastPages**'  is meaningless, 
although this expression does not cause errors.
   I think this expression should be 'writePos - lastCommittedPosition > 0', it 
used to determine whether there is uncommitted data. Do you think so?


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