You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2024/11/21 07:30:09 UTC
(iotdb) branch fix_big_request_can_not_write_ratis created (now 7f8d11446db)
This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a change to branch fix_big_request_can_not_write_ratis
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 7f8d11446db fix bug
This branch includes the following new commits:
new 7f8d11446db fix bug
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(iotdb) 01/01: fix bug
Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch fix_big_request_can_not_write_ratis
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 7f8d11446db366b318cdddb094772218b3f03e45
Author: OneSizeFitQuorum <ta...@apache.org>
AuthorDate: Thu Nov 21 15:29:47 2024 +0800
fix bug
Signed-off-by: OneSizeFitQuorum <ta...@apache.org>
---
.../java/org/apache/iotdb/consensus/ratis/utils/Utils.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
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 9f25e837924..14bc59b88e9 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
@@ -56,6 +56,7 @@ import java.util.function.BooleanSupplier;
import java.util.stream.Collectors;
public class Utils {
+
private static final int TEMP_BUFFER_SIZE = 1024;
private static final byte PADDING_MAGIC = 0x47;
private static final String DATA_REGION_GROUP = "group-0001";
@@ -311,6 +312,9 @@ public class Utils {
RaftServerConfigKeys.Log.setCorruptionPolicy(
properties, RaftServerConfigKeys.Log.CorruptionPolicy.WARN_AND_RETURN);
+ RaftServerConfigKeys.Write.setByteLimit(
+ properties, config.getLeaderLogAppender().getBufferByteLimit());
+
RaftServerConfigKeys.Log.Appender.setBufferByteLimit(
properties, config.getLeaderLogAppender().getBufferByteLimit());
RaftServerConfigKeys.Log.Appender.setSnapshotChunkSizeMax(
@@ -331,8 +335,12 @@ public class Utils {
RaftServerConfigKeys.Read.setTimeout(properties, config.getRead().getReadTimeout());
RaftServerConfigKeys.setSleepDeviationThreshold(
- properties, config.getUtils().getSleepDeviationThresholdMs());
- RaftServerConfigKeys.setCloseThreshold(properties, config.getUtils().getCloseThresholdMs());
+ properties,
+ TimeDuration.valueOf(
+ config.getUtils().getSleepDeviationThresholdMs(), TimeUnit.MILLISECONDS));
+ RaftServerConfigKeys.setCloseThreshold(
+ properties,
+ TimeDuration.valueOf(config.getUtils().getCloseThresholdMs(), TimeUnit.MILLISECONDS));
final TimeDuration clientMaxRetryGap = getMaxRetrySleepTime(config.getClient());
RaftServerConfigKeys.RetryCache.setExpiryTime(properties, clientMaxRetryGap);