Skip to content

Commit

Permalink
[ISSUE #7478] On startup, if not check crc, not read body. avoid star…
Browse files Browse the repository at this point in the history
…tup too slow when data is large
  • Loading branch information
iamgd67 committed Oct 19, 2023
1 parent dbc633d commit 1440830
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions store/src/main/java/org/apache/rocketmq/store/CommitLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public void recoverNormally(long maxPhyOffsetOfConsumeQueue) throws RocksDBExcep
// normal recover doesn't require dispatching
boolean doDispatch = false;
while (true) {
DispatchRequest dispatchRequest = this.checkMessageAndReturnSize(byteBuffer, checkCRCOnRecover, checkDupInfo);
DispatchRequest dispatchRequest = this.checkMessageAndReturnSize(byteBuffer, checkCRCOnRecover, checkDupInfo, checkCRCOnRecover);
int size = dispatchRequest.getMsgSize();
// Normal data
if (dispatchRequest.isSuccess() && size > 0) {
Expand Down Expand Up @@ -663,7 +663,7 @@ public void recoverAbnormally(long maxPhyOffsetOfConsumeQueue) throws RocksDBExc
// abnormal recover require dispatching
boolean doDispatch = true;
while (true) {
DispatchRequest dispatchRequest = this.checkMessageAndReturnSize(byteBuffer, checkCRCOnRecover, checkDupInfo);
DispatchRequest dispatchRequest = this.checkMessageAndReturnSize(byteBuffer, checkCRCOnRecover, checkDupInfo, checkCRCOnRecover);
int size = dispatchRequest.getMsgSize();

if (dispatchRequest.isSuccess()) {
Expand Down

0 comments on commit 1440830

Please sign in to comment.