From 28a0906bcfdc37b150a90b20655bd997e10cd25f Mon Sep 17 00:00:00 2001 From: dongeforever Date: Wed, 26 Dec 2018 14:25:55 +0800 Subject: [PATCH] Polish file reserved hours to 24 * 365 * 10 when disableDeleteDLedger --- .../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 1f029c51..a48c1bed 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 @@ -75,6 +75,7 @@ public class DLedgerCommitLog extends CommitLog { super(defaultMessageStore); dLedgerConfig = new DLedgerConfig(); dLedgerConfig.setEnableDiskForceClean(defaultMessageStore.getMessageStoreConfig().isCleanFileForciblyEnable()); + dLedgerConfig.setStoreType(DLedgerConfig.FILE); dLedgerConfig.setSelfId(defaultMessageStore.getMessageStoreConfig().getdLegerSelfId()); dLedgerConfig.setGroup(defaultMessageStore.getMessageStoreConfig().getdLegerGroup()); dLedgerConfig.setPeers(defaultMessageStore.getMessageStoreConfig().getdLegerPeers()); @@ -114,7 +115,7 @@ public class DLedgerCommitLog extends CommitLog { private void disableDeleteDledger() { dLedgerConfig.setEnableDiskForceClean(false); - dLedgerConfig.setFileReservedHours(Integer.MAX_VALUE); + dLedgerConfig.setFileReservedHours(24 * 365 * 10); } @Override -- GitLab