This is an automated email from the ASF dual-hosted git repository.
qiaojialin 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 e71044e1bb Enable partition cache and change default size to 10000
(#6448)
e71044e1bb is described below
commit e71044e1bb8bfb18cfdea7c3afeb087effaac118
Author: Zhang.Jinrui <[email protected]>
AuthorDate: Mon Jun 27 08:50:21 2022 +0800
Enable partition cache and change default size to 10000 (#6448)
---
.../apache/iotdb/consensus/multileader/MultiLeaderConsensusTest.java | 3 ++-
server/src/assembly/resources/conf/iotdb-datanode.properties | 2 +-
server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git
a/consensus/src/test/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensusTest.java
b/consensus/src/test/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensusTest.java
index 5b3b8253f8..320d4d3d27 100644
---
a/consensus/src/test/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensusTest.java
+++
b/consensus/src/test/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensusTest.java
@@ -55,6 +55,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
public class MultiLeaderConsensusTest {
@@ -346,7 +347,7 @@ public class MultiLeaderConsensusTest {
private static class TestStateMachine implements IStateMachine,
IStateMachine.EventApi {
- private final Set<IndexedConsensusRequest> requestSet = new HashSet<>();
+ private final Set<IndexedConsensusRequest> requestSet =
ConcurrentHashMap.newKeySet();
public Set<IndexedConsensusRequest> getRequestSet() {
return requestSet;
diff --git a/server/src/assembly/resources/conf/iotdb-datanode.properties
b/server/src/assembly/resources/conf/iotdb-datanode.properties
index 2e195d86a6..af925f2c95 100644
--- a/server/src/assembly/resources/conf/iotdb-datanode.properties
+++ b/server/src/assembly/resources/conf/iotdb-datanode.properties
@@ -1031,7 +1031,7 @@ timestamp_precision=ms
# cache size for partition.
# This cache is used to improve partition fetch from config node.
# Datatype: int
-# partition_cache_size=0
+# partition_cache_size=100000
####################
### Schema File Configuration
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index 26ba351a27..d27da1e114 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -896,7 +896,7 @@ public class IoTDBConfig {
* Cache size of partition cache in {@link
* org.apache.iotdb.db.mpp.plan.analyze.ClusterPartitionFetcher}
*/
- private int partitionCacheSize = 0;
+ private int partitionCacheSize = 100000;
/** Cache size of user and role */
private int authorCacheSize = 100;