Skip to content

Commit

Permalink
[ISSUE #7013] Polish ColdDataCheckService's logic (#7014)
Browse files Browse the repository at this point in the history
* polish coldCtrl

* remove the catch.
  • Loading branch information
GenerousMan authored Jul 11, 2023
1 parent b4496be commit 1f0f3b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion store/src/main/java/org/apache/rocketmq/store/CommitLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -2089,6 +2089,11 @@ public void run() {
} else {
this.waitForRunning(defaultMessageStore.getMessageStoreConfig().getTimerColdDataCheckIntervalMs());
}

if (pageSize < 0) {
initPageSize();
}

long beginClockTimestamp = this.systemClock.now();
scanFilesInPageCache();
long costTime = this.systemClock.now() - beginClockTimestamp;
Expand Down Expand Up @@ -2182,7 +2187,7 @@ private byte[] checkFileInPageCache(MappedFile mappedFile) {
}

private void initPageSize() {
if (pageSize < 0) {
if (pageSize < 0 && defaultMessageStore.getMessageStoreConfig().isColdDataFlowControlEnable()) {
try {
if (!MixAll.isWindows()) {
pageSize = LibC.INSTANCE.getpagesize();
Expand Down

0 comments on commit 1f0f3b2

Please sign in to comment.