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/07/02 00:01:22 UTC

[GitHub] [rocketmq] xiaoyaofawai commented on issue #3099: The jedgment 'writePos - lastCommittedPosition > commitLeastPages' in the method 'commit0' of class 'MappedFile' is meaningless

xiaoyaofawai commented on issue #3099:
URL: https://github.com/apache/rocketmq/issues/3099#issuecomment-872620058


   I don't think so,  as you see in the method  'isAbleToCommit(final int commitLeastPages)':
   ![image](https://user-images.githubusercontent.com/12688996/124201317-4d6bd300-db0a-11eb-82be-cde208642a1f.png)
   if this mappedFile is full, it should be commit although uncommited data is less then commitLeastPages. And this function return 'true'. But in the method 'commit0(final int commitLeastPages)', it will cause data can't be commit, if this mappedFile is full and the jedgment is changed to  'writePos - lastCommittedPosition > commitLeastPages * OS_PAGE_SIZE'. 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: dev-unsubscribe@rocketmq.apache.org

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