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 2022/03/11 15:02:49 UTC

[GitHub] [rocketmq] shanghaifei opened a new issue #3962: Variable name is misleading,please fix it

shanghaifei opened a new issue #3962:
URL: https://github.com/apache/rocketmq/issues/3962


   **in store module,org/apache/rocketmq/store/MappedFile.java**
   
   ```
   protected boolean isAbleToCommit(final int commitLeastPages) {
           // this is commit position,not flush position
           // int flush = this.committedPosition.get();
           int commit = this.committedPosition.get();
           int write = this.wrotePosition.get();
   
           if (this.isFull()) {
               return true;
           }
   
           if (commitLeastPages > 0) {
               //return ((write / OS_PAGE_SIZE) - (flush / OS_PAGE_SIZE)) >= commitLeastPages;
               return ((write / OS_PAGE_SIZE) - (commit / OS_PAGE_SIZE)) >= commitLeastPages;
           }
   
           //return write > flush;
           return write > commit;
       }
   ```
   
   
   


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