[ISSUE #6250] Fix wrong value of MessageStoreConfig#storePathEpochFile

1. fix wrong value of MessageStoreConfig#storePathEpochFile
This commit is contained in:
TheR1sing3un
2023-03-05 21:57:24 +08:00
committed by GitHub
parent ce99a7fe8a
commit 18fcce664c
@@ -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;
@@ -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;
@@ -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;
@@ -627,6 +627,9 @@ public class MessageStoreConfig {
}
public String getStorePathEpochFile() {
if (storePathEpochFile == null) {
return storePathRootDir + File.separator + "epochFileCheckpoint";
}
return storePathEpochFile;
}
@@ -1067,6 +1070,7 @@ public class MessageStoreConfig {
public void setReadOnlyCommitLogStorePaths(String readOnlyCommitLogStorePaths) {
this.readOnlyCommitLogStorePaths = readOnlyCommitLogStorePaths;
}
public String getdLegerGroup() {
return dLegerGroup;
}
@@ -1470,6 +1474,7 @@ public class MessageStoreConfig {
public int getMappedFileSizeTimerLog() {
return mappedFileSizeTimerLog;
}
public void setMappedFileSizeTimerLog(final int mappedFileSizeTimerLog) {
this.mappedFileSizeTimerLog = mappedFileSizeTimerLog;
}
@@ -1477,6 +1482,7 @@ public class MessageStoreConfig {
public int getTimerPrecisionMs() {
return timerPrecisionMs;
}
public void setTimerPrecisionMs(int timerPrecisionMs) {
int[] candidates = {100, 200, 500, 1000};
for (int i = 1; i < candidates.length; i++) {
@@ -1487,9 +1493,11 @@ public class MessageStoreConfig {
}
this.timerPrecisionMs = candidates[candidates.length - 1];
}
public int getTimerRollWindowSlot() {
return timerRollWindowSlot;
}
public int getTimerGetMessageThreadNum() {
return timerGetMessageThreadNum;
}
@@ -1501,9 +1509,11 @@ public class MessageStoreConfig {
public int getTimerPutMessageThreadNum() {
return timerPutMessageThreadNum;
}
public void setTimerPutMessageThreadNum(int timerPutMessageThreadNum) {
this.timerPutMessageThreadNum = timerPutMessageThreadNum;
}
public boolean isTimerEnableDisruptor() {
return timerEnableDisruptor;
}
@@ -1515,12 +1525,15 @@ public class MessageStoreConfig {
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;
}
@@ -1533,9 +1546,10 @@ public class MessageStoreConfig {
return timerWarmEnable;
}
public boolean isTimerWheelEnable() {
public boolean isTimerWheelEnable() {
return timerWheelEnable;
}
public void setTimerWheelEnable(boolean timerWheelEnable) {
this.timerWheelEnable = timerWheelEnable;
}
@@ -1555,10 +1569,12 @@ public class MessageStoreConfig {
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;
}
@@ -1566,9 +1582,11 @@ public class MessageStoreConfig {
public void setTimerFlushIntervalMs(final int timerFlushIntervalMs) {
this.timerFlushIntervalMs = timerFlushIntervalMs;
}
public void setTimerRollWindowSlot(final int timerRollWindowSlot) {
this.timerRollWindowSlot = timerRollWindowSlot;
}
public int getTimerProgressLogIntervalMs() {
return timerProgressLogIntervalMs;
}
@@ -1588,6 +1606,7 @@ public class MessageStoreConfig {
public int getTimerMaxDelaySec() {
return timerMaxDelaySec;
}
public void setTimerMaxDelaySec(final int timerMaxDelaySec) {
this.timerMaxDelaySec = timerMaxDelaySec;
}