You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by ji...@apache.org on 2023/03/05 13:57:44 UTC
[rocketmq] branch develop updated: [ISSUE #6250] Fix wrong value of MessageStoreConfig#storePathEpochFile
This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 18fcce664 [ISSUE #6250] Fix wrong value of MessageStoreConfig#storePathEpochFile
18fcce664 is described below
commit 18fcce664c8cf874f0da83a33976e09326021ee0
Author: TheR1sing3un <87...@users.noreply.github.com>
AuthorDate: Sun Mar 5 21:57:24 2023 +0800
[ISSUE #6250] Fix wrong value of MessageStoreConfig#storePathEpochFile
1. fix wrong value of MessageStoreConfig#storePathEpochFile
---
.../rocketmq/store/config/MessageStoreConfig.java | 29 ++++++++++++++++++----
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/store/src/main/java/org/apache/rocketmq/store/config/MessageStoreConfig.java b/store/src/main/java/org/apache/rocketmq/store/config/MessageStoreConfig.java
index 0f673be54..2078caabe 100644
--- a/store/src/main/java/org/apache/rocketmq/store/config/MessageStoreConfig.java
+++ b/store/src/main/java/org/apache/rocketmq/store/config/MessageStoreConfig.java
@@ -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;
}