You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/04/26 08:32:03 UTC

[GitHub] [rocketmq] cserwen opened a new pull request, #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

cserwen opened a new pull request, #4212:
URL: https://github.com/apache/rocketmq/pull/4212

   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   fix #4211
   
   ## Brief changelog
   
   XX
   
   ## Verifying this change
   
   XXXX
   
   Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] cserwen commented on a diff in pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] codecov-commenter commented on pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212#issuecomment-1109915330

   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/4212?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#4212](https://codecov.io/gh/apache/rocketmq/pull/4212?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (97f35ee) into [develop](https://codecov.io/gh/apache/rocketmq/commit/9de7be47850684c329cc6d324b01950386c5963b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9de7be4) will **decrease** coverage by `0.07%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #4212      +/-   ##
   =============================================
   - Coverage      48.18%   48.11%   -0.08%     
   + Complexity      5048     5031      -17     
   =============================================
     Files            636      636              
     Lines          42506    42507       +1     
     Branches        5568     5568              
   =============================================
   - Hits           20483    20451      -32     
   - Misses         19545    19575      +30     
   - Partials        2478     2481       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/4212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...pache/rocketmq/store/dledger/DLedgerCommitLog.java](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2RsZWRnZXIvRExlZGdlckNvbW1pdExvZy5qYXZh) | `76.21% <100.00%> (+0.04%)` | :arrow_up: |
   | [...rg/apache/rocketmq/common/stats/StatsSnapshot.java](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNTbmFwc2hvdC5qYXZh) | `84.61% <0.00%> (-15.39%)` | :arrow_down: |
   | [.../apache/rocketmq/common/stats/MomentStatsItem.java](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvTW9tZW50U3RhdHNJdGVtLmphdmE=) | `38.09% <0.00%> (-9.53%)` | :arrow_down: |
   | [...va/org/apache/rocketmq/store/FlushDiskWatcher.java](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL0ZsdXNoRGlza1dhdGNoZXIuamF2YQ==) | `81.25% <0.00%> (-9.38%)` | :arrow_down: |
   | [...ache/rocketmq/common/stats/MomentStatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvTW9tZW50U3RhdHNJdGVtU2V0LmphdmE=) | `43.47% <0.00%> (-8.70%)` | :arrow_down: |
   | [...org/apache/rocketmq/common/stats/StatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNJdGVtU2V0LmphdmE=) | `43.28% <0.00%> (-5.98%)` | :arrow_down: |
   | [...va/org/apache/rocketmq/common/stats/StatsItem.java](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNJdGVtLmphdmE=) | `50.00% <0.00%> (-5.84%)` | :arrow_down: |
   | [...ketmq/common/protocol/body/ConsumerConnection.java](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vcHJvdG9jb2wvYm9keS9Db25zdW1lckNvbm5lY3Rpb24uamF2YQ==) | `95.83% <0.00%> (-4.17%)` | :arrow_down: |
   | [...ava/org/apache/rocketmq/filter/util/BitsArray.java](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CaXRzQXJyYXkuamF2YQ==) | `59.82% <0.00%> (-2.57%)` | :arrow_down: |
   | [...he/rocketmq/client/trace/AsyncTraceDispatcher.java](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvQXN5bmNUcmFjZURpc3BhdGNoZXIuamF2YQ==) | `79.70% <0.00%> (-1.49%)` | :arrow_down: |
   | ... and [8 more](https://codecov.io/gh/apache/rocketmq/pull/4212/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/4212?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/4212?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9de7be4...97f35ee](https://codecov.io/gh/apache/rocketmq/pull/4212?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] coveralls commented on pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
coveralls commented on PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212#issuecomment-1109913988

   
   [![Coverage Status](https://coveralls.io/builds/48582072/badge)](https://coveralls.io/builds/48582072)
   
   Coverage decreased (-0.004%) to 51.998% when pulling **97f35eec83e0e41ebc6bbfe187e3a69535daede4 on cserwen:config-dledger** into **9de7be47850684c329cc6d324b01950386c5963b on apache:develop**.
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] hzh0425 commented on a diff in pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
hzh0425 commented on code in PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212#discussion_r858454980


##########
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:
   Should you add a new parameter instead of sharing the same one?



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] hzh0425 commented on pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
hzh0425 commented on PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212#issuecomment-1110432684

   @hzh0425 approved this pull request.


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] hzh0425 commented on a diff in pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
hzh0425 commented on code in PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212#discussion_r858589686


##########
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:
   That's right



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] cserwen commented on a diff in pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
cserwen commented on code in PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212#discussion_r858461776


##########
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:
   Are they any different?



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] hzh0425 commented on pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
hzh0425 commented on PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212#issuecomment-1109689752

   LGTM


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] hzh0425 commented on a diff in pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
hzh0425 commented on code in PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212#discussion_r858590411


##########
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:
   That’s right



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] RongtongJin merged pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
RongtongJin merged PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] hzh0425 commented on a diff in pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
hzh0425 commented on code in PR #4212:
URL: https://github.com/apache/rocketmq/pull/4212#discussion_r858536838


##########
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)
   



-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq] cserwen commented on a diff in pull request #4212: [ISSUE #4211] Fix diskMaxUsedSpaceRatio does not take effect in dLedger

Posted by GitBox <gi...@apache.org>.
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. And 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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org