RongtongJin commented on code in PR #7524: URL: https://github.com/apache/rocketmq/pull/7524#discussion_r1378578178
########## store/src/main/java/org/apache/rocketmq/store/CommitLog.java: ########## @@ -1634,12 +1634,18 @@ private void swapRequests() { private void doCommit() { if (!this.requestsRead.isEmpty()) { for (GroupCommitRequest req : this.requestsRead) { - // There may be a message in the next file, so a maximum of - // two times the flush - boolean flushOK = CommitLog.this.mappedFileQueue.getFlushedWhere() >= req.getNextOffset(); - for (int i = 0; i < 2 && !flushOK; i++) { + boolean flushOK = false; Review Comment: How about flushOK=CommitLog.this.mappedFileQueue.getFlushedWhere() >= req.getNextOffset() when init? Prevent every request from flushing at least once. ########## store/src/main/java/org/apache/rocketmq/store/CommitLog.java: ########## @@ -1634,12 +1634,18 @@ private void swapRequests() { private void doCommit() { if (!this.requestsRead.isEmpty()) { for (GroupCommitRequest req : this.requestsRead) { - // There may be a message in the next file, so a maximum of - // two times the flush - boolean flushOK = CommitLog.this.mappedFileQueue.getFlushedWhere() >= req.getNextOffset(); - for (int i = 0; i < 2 && !flushOK; i++) { + boolean flushOK = false; Review Comment: How about flushOK=CommitLog.this.mappedFileQueue.getFlushedWhere() >= req.getNextOffset() when init? Prevent every request from flushing at least once. -- 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: commits-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org