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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]