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/06 08:47:34 UTC

[GitHub] [rocketmq] CleverZiv commented on issue #2338: The parameter commitLeastPages is never used

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


   Hello, I have a question about this:
   commitLeastPages and writePos - lastCommittedPosition are two-dimensional variables,why this judgment can achieve the purpose that determine whether to commit or not?
   by the way, the method MappedFile#isAbleToCommit has similar logic, the code:
   
           int flush = this.committedPosition.get();
           int write = this.wrotePosition.get();
           ...
           if (commitLeastPages > 0) {
               return ((write / OS_PAGE_SIZE) - (flush / OS_PAGE_SIZE)) >= commitLeastPages;
           }
   I mean write / OS_PAGE_SIZE and commitLeastPages are the same dimensional variables
   Looking forward to your reply, thank you~


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