cserwen commented on code in PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212#discussion_r858584168


##########
store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:
##########
@@ -101,6 +101,8 @@ public DLedgerCommitLog(final DefaultMessageStore 
defaultMessageStore) {
         
dLedgerConfig.setFileReservedHours(defaultMessageStore.getMessageStoreConfig().getFileReservedTime()
 + 1);
         
dLedgerConfig.setPreferredLeaderId(defaultMessageStore.getMessageStoreConfig().getPreferredLeaderId());
         
dLedgerConfig.setEnableBatchPush(defaultMessageStore.getMessageStoreConfig().isEnableBatchPush());
+        
dLedgerConfig.setDiskSpaceRatioToCheckExpired(defaultMessageStore.getMessageStoreConfig().getDiskMaxUsedSpaceRatio());

Review Comment:
   > The initial configuration of these two options in dledgerConfig is 
different, and the meaning should be different? 
![image](https://user-images.githubusercontent.com/58988019/165277714-853b1b8b-fcc5-4fab-a40f-68e441dda7be.png)
   
   OK, I get it. IMO, we just need to set `diskSpaceRatioToCheckExpired` be the 
same as `diskMaxUsedSpaceRatio` . The `diskSpaceRatioToForceClean` should not 
be changed. So that cleanup logic will be consistent with master-slave.
   
https://github.com/apache/rocketmq/blob/9de7be47850684c329cc6d324b01950386c5963b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java#L1700



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to