From bd026fb6b73a1e21e78af69c6c6c6aa70b3d0603 Mon Sep 17 00:00:00 2001 From: Zhendong Liu Date: Thu, 1 Nov 2018 19:10:05 +0800 Subject: [PATCH] remove isDamanged --- store/src/main/java/org/apache/rocketmq/store/CommitLog.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/store/src/main/java/org/apache/rocketmq/store/CommitLog.java b/store/src/main/java/org/apache/rocketmq/store/CommitLog.java index e132a7a7..55f16ea9 100644 --- a/store/src/main/java/org/apache/rocketmq/store/CommitLog.java +++ b/store/src/main/java/org/apache/rocketmq/store/CommitLog.java @@ -171,7 +171,6 @@ public class CommitLog { ByteBuffer byteBuffer = mappedFile.sliceByteBuffer(); long processOffset = mappedFile.getFileFromOffset(); long mappedFileOffset = 0; - boolean isDamaged = false; while (true) { DispatchRequest dispatchRequest = this.checkMessageAndReturnSize(byteBuffer, checkCRCOnRecover); int size = dispatchRequest.getMsgSize(); @@ -210,7 +209,7 @@ public class CommitLog { this.mappedFileQueue.truncateDirtyFiles(processOffset); // Clear ConsumeQueue redundant data - if (isDamaged && maxPhyOffsetOfConsumeQueue >= processOffset) { + if (maxPhyOffsetOfConsumeQueue >= processOffset) { log.warn("maxPhyOffsetOfConsumeQueue({}) >= processOffset({}), truncate dirty logic files", maxPhyOffsetOfConsumeQueue, processOffset); this.defaultMessageStore.truncateDirtyLogicFiles(processOffset); } -- GitLab