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 1f029c51a0b52c94aa124eecace886e3b7393097..a48c1bed8bacbd84cc6ca0442087190d63b8a6a4 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