-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Description
in the module store,in the file org/apache/rocketmq/store/MappedFile.java
in the method isAbleToCommit()
please use the variable name 'commit' instead variable name 'flush'
it's wrong,please fix it
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;
}
Metadata
Metadata
Assignees
Labels
No labels