This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 4be0aaaafdd [RatisConsensus] use warn_and_return to enable cluster
restart when log corruption can be ignored (#11036)
4be0aaaafdd is described below
commit 4be0aaaafdd9d172ce38113fb2524510d976ad2a
Author: William Song <[email protected]>
AuthorDate: Tue Sep 5 14:54:13 2023 +0800
[RatisConsensus] use warn_and_return to enable cluster restart when log
corruption can be ignored (#11036)
---
.../src/main/java/org/apache/iotdb/consensus/ratis/utils/Utils.java | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Utils.java
b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Utils.java
index 3026cb9cd95..7eb30f1a93e 100644
---
a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Utils.java
+++
b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/utils/Utils.java
@@ -269,6 +269,8 @@ public class Utils {
RaftServerConfigKeys.Log.setForceSyncNum(properties,
config.getLog().getForceSyncNum());
RaftServerConfigKeys.Log.setUnsafeFlushEnabled(
properties, config.getLog().isUnsafeFlushEnabled());
+ RaftServerConfigKeys.Log.setCorruptionPolicy(
+ properties, RaftServerConfigKeys.Log.CorruptionPolicy.WARN_AND_RETURN);
RaftServerConfigKeys.Log.Appender.setBufferByteLimit(
properties, config.getLeaderLogAppender().getBufferByteLimit());