This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch rel/1.2
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.2 by this push:
new 0caf5f9e5da [To rel/1.2] [RatisConsensus] use warn_and_return to
enable cluster restart when log corruption can be ignored (#11037)
0caf5f9e5da is described below
commit 0caf5f9e5da95da83b05391e6e5f5646544048e3
Author: William Song <[email protected]>
AuthorDate: Tue Sep 5 14:54:31 2023 +0800
[To rel/1.2] [RatisConsensus] use warn_and_return to enable cluster restart
when log corruption can be ignored (#11037)
---
.../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());