Skip to content

Commit

Permalink
[ISSUE #6250] Fix wrong value of MessageStoreConfig#storePathEpochFile
Browse files Browse the repository at this point in the history
1. fix wrong value of MessageStoreConfig#storePathEpochFile
  • Loading branch information
TheR1sing3un authored Mar 5, 2023
1 parent ce99a7f commit 18fcce6
Showing 1 changed file with 24 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.apache.rocketmq.store.config;

import java.io.File;

import org.apache.rocketmq.common.annotation.ImportantField;
import org.apache.rocketmq.store.ConsumeQueue;
import org.apache.rocketmq.store.queue.BatchConsumeQueue;
Expand All @@ -38,8 +39,7 @@ public class MessageStoreConfig {

//The directory in which the epochFile is kept
@ImportantField
private String storePathEpochFile = System.getProperty("user.home") + File.separator + "store"
+ File.separator + "epochFileCheckpoint";
private String storePathEpochFile = null;

private String readOnlyCommitLogStorePaths = null;

Expand Down Expand Up @@ -81,8 +81,8 @@ public class MessageStoreConfig {
/**
* 1. Register to broker after (startTime + disappearTimeAfterStart)
* 2. Internal msg exchange will start after (startTime + disappearTimeAfterStart)
* A. PopReviveService
* B. TimerDequeueGetService
* A. PopReviveService
* B. TimerDequeueGetService
*/
@ImportantField
private int disappearTimeAfterStart = -1;
Expand Down Expand Up @@ -627,6 +627,9 @@ public void setStorePathDLedgerCommitLog(String storePathDLedgerCommitLog) {
}

public String getStorePathEpochFile() {
if (storePathEpochFile == null) {
return storePathRootDir + File.separator + "epochFileCheckpoint";
}
return storePathEpochFile;
}

Expand Down Expand Up @@ -1067,6 +1070,7 @@ public String getReadOnlyCommitLogStorePaths() {
public void setReadOnlyCommitLogStorePaths(String readOnlyCommitLogStorePaths) {
this.readOnlyCommitLogStorePaths = readOnlyCommitLogStorePaths;
}

public String getdLegerGroup() {
return dLegerGroup;
}
Expand Down Expand Up @@ -1470,13 +1474,15 @@ public void setAsyncLearner(boolean asyncLearner) {
public int getMappedFileSizeTimerLog() {
return mappedFileSizeTimerLog;
}

public void setMappedFileSizeTimerLog(final int mappedFileSizeTimerLog) {
this.mappedFileSizeTimerLog = mappedFileSizeTimerLog;
}

public int getTimerPrecisionMs() {
return timerPrecisionMs;
}

public void setTimerPrecisionMs(int timerPrecisionMs) {
int[] candidates = {100, 200, 500, 1000};
for (int i = 1; i < candidates.length; i++) {
Expand All @@ -1487,9 +1493,11 @@ public void setTimerPrecisionMs(int timerPrecisionMs) {
}
this.timerPrecisionMs = candidates[candidates.length - 1];
}

public int getTimerRollWindowSlot() {
return timerRollWindowSlot;
}

public int getTimerGetMessageThreadNum() {
return timerGetMessageThreadNum;
}
Expand All @@ -1501,9 +1509,11 @@ public void setTimerGetMessageThreadNum(int timerGetMessageThreadNum) {
public int getTimerPutMessageThreadNum() {
return timerPutMessageThreadNum;
}

public void setTimerPutMessageThreadNum(int timerPutMessageThreadNum) {
this.timerPutMessageThreadNum = timerPutMessageThreadNum;
}

public boolean isTimerEnableDisruptor() {
return timerEnableDisruptor;
}
Expand All @@ -1515,12 +1525,15 @@ public boolean isTimerEnableCheckMetrics() {
public void setTimerEnableCheckMetrics(boolean timerEnableCheckMetrics) {
this.timerEnableCheckMetrics = timerEnableCheckMetrics;
}

public boolean isTimerStopEnqueue() {
return timerStopEnqueue;
}

public void setTimerStopEnqueue(boolean timerStopEnqueue) {
this.timerStopEnqueue = timerStopEnqueue;
}

public String getTimerCheckMetricsWhen() {
return timerCheckMetricsWhen;
}
Expand All @@ -1533,9 +1546,10 @@ public boolean isTimerWarmEnable() {
return timerWarmEnable;
}

public boolean isTimerWheelEnable() {
public boolean isTimerWheelEnable() {
return timerWheelEnable;
}

public void setTimerWheelEnable(boolean timerWheelEnable) {
this.timerWheelEnable = timerWheelEnable;
}
Expand All @@ -1555,20 +1569,24 @@ public void setTimerMetricSmallThreshold(int timerMetricSmallThreshold) {
public int getTimerCongestNumEachSlot() {
return timerCongestNumEachSlot;
}

public void setTimerCongestNumEachSlot(int timerCongestNumEachSlot) {
// In order to get this value from messageStoreConfig properties file created before v4.4.1.
this.timerCongestNumEachSlot = timerCongestNumEachSlot;
}

public int getTimerFlushIntervalMs() {
return timerFlushIntervalMs;
}

public void setTimerFlushIntervalMs(final int timerFlushIntervalMs) {
this.timerFlushIntervalMs = timerFlushIntervalMs;
}

public void setTimerRollWindowSlot(final int timerRollWindowSlot) {
this.timerRollWindowSlot = timerRollWindowSlot;
}

public int getTimerProgressLogIntervalMs() {
return timerProgressLogIntervalMs;
}
Expand All @@ -1588,6 +1606,7 @@ public void setTimerInterceptDelayLevel(boolean timerInterceptDelayLevel) {
public int getTimerMaxDelaySec() {
return timerMaxDelaySec;
}

public void setTimerMaxDelaySec(final int timerMaxDelaySec) {
this.timerMaxDelaySec = timerMaxDelaySec;
}
Expand Down

0 comments on commit 18fcce6

Please sign in to comment.