From 9d07cc7c51e127fc1cbb0593bd70652fa43b2939 Mon Sep 17 00:00:00 2001 From: littleboy <2283985296@qq.com> Date: Thu, 18 Apr 2024 14:20:16 +0800 Subject: [PATCH] [ISSUE #8032] Set checkDupInfo value from config --- .../org/apache/rocketmq/store/dledger/DLedgerCommitLog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java b/store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java index 27a18abc9d9..e617343f9ad 100644 --- a/store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java +++ b/store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java @@ -318,6 +318,7 @@ private void dledgerRecoverNormally(long maxPhyOffsetOfConsumeQueue) throws Rock private void dledgerRecoverAbnormally(long maxPhyOffsetOfConsumeQueue) throws RocksDBException { boolean checkCRCOnRecover = this.defaultMessageStore.getMessageStoreConfig().isCheckCRCOnRecover(); + boolean checkDupInfo = this.defaultMessageStore.getMessageStoreConfig().isDuplicationEnable(); dLedgerFileStore.load(); if (!dLedgerFileList.getMappedFiles().isEmpty()) { dLedgerFileStore.recover(); @@ -346,7 +347,7 @@ private void dledgerRecoverAbnormally(long maxPhyOffsetOfConsumeQueue) throws Ro long processOffset = mmapFile.getFileFromOffset(); long mmapFileOffset = 0; while (true) { - DispatchRequest dispatchRequest = this.checkMessageAndReturnSize(byteBuffer, checkCRCOnRecover, true); + DispatchRequest dispatchRequest = this.checkMessageAndReturnSize(byteBuffer, checkCRCOnRecover, checkDupInfo); int size = dispatchRequest.getMsgSize(); if (dispatchRequest.isSuccess()) {