You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by dongeforever <gi...@git.apache.org> on 2017/09/21 03:11:10 UTC
[GitHub] incubator-rocketmq pull request #143: [ROCKETMQ-256] Clean commit log files ...
Github user dongeforever commented on a diff in the pull request:
https://github.com/apache/incubator-rocketmq/pull/143#discussion_r140139906
--- Diff: store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java ---
@@ -1392,6 +1397,14 @@ public void run() {
}, 6, TimeUnit.SECONDS);
}
+ @Override
+ public void purge(int watermark, long consumedPhysicalOffset, boolean force) {
+ cleanCommitLogService.setPurgeForcefullyWhenManual(force);
+ cleanCommitLogService.setDiskSpaceManuallyCleanRatio(watermark / 100.0);
+ cleanCommitLogService.setConsumedPhysicalOffset(consumedPhysicalOffset);
+ cleanCommitLogService.executeDeleteFilesManually();
--- End diff --
This is not thread safe.
How about just delivering the arguments into executeDeleteFilesManually() directly?
---