You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2022/11/26 16:34:50 UTC

[iotdb] 01/01: change default data consensus to IoT and schema to Ratis

This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch change_default_consensus
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 7214caef203071079473c639f854715c21fda64f
Author: qiaojialin <64...@qq.com>
AuthorDate: Sun Nov 27 00:34:36 2022 +0800

    change default data consensus to IoT and schema to Ratis
---
 .../org/apache/iotdb/confignode/conf/ConfigNodeConfig.java   |  8 ++++----
 docs/UserGuide/Monitor-Alert/Metric-Tool.md                  |  2 +-
 docs/UserGuide/Reference/Common-Config-Manual.md             | 12 ++++++------
 docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md               |  2 +-
 docs/zh/UserGuide/Reference/Common-Config-Manual.md          |  6 +++---
 .../cluster/Apache IoTDB DataNode Dashboard v0.14.0.json     |  4 ++--
 .../src/assembly/resources/conf/iotdb-common.properties      |  8 ++++----
 7 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
index 243f7a86b1..98d37ba2e4 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeConfig.java
@@ -53,14 +53,14 @@ public class ConfigNodeConfig {
   /** ConfigNodeGroup consensus protocol */
   private String configNodeConsensusProtocolClass = ConsensusFactory.RATIS_CONSENSUS;
 
-  /** DataNode schema region consensus protocol */
-  private String schemaRegionConsensusProtocolClass = ConsensusFactory.SIMPLE_CONSENSUS;
+  /** Schema region consensus protocol */
+  private String schemaRegionConsensusProtocolClass = ConsensusFactory.RATIS_CONSENSUS;
 
   /** The maximum number of SchemaRegion expected to be managed by each DataNode. */
   private double schemaRegionPerDataNode = 1.0;
 
-  /** DataNode data region consensus protocol */
-  private String dataRegionConsensusProtocolClass = ConsensusFactory.SIMPLE_CONSENSUS;
+  /** Data region consensus protocol */
+  private String dataRegionConsensusProtocolClass = ConsensusFactory.IOT_CONSENSUS;
 
   /** The maximum number of DataRegion expected to be managed by each DataNode. */
   private double dataRegionPerProcessor = 0.5;
diff --git a/docs/UserGuide/Monitor-Alert/Metric-Tool.md b/docs/UserGuide/Monitor-Alert/Metric-Tool.md
index f35ce9d50d..4e6f15cbd0 100644
--- a/docs/UserGuide/Monitor-Alert/Metric-Tool.md
+++ b/docs/UserGuide/Monitor-Alert/Metric-Tool.md
@@ -175,7 +175,7 @@ Core-level metrics are enabled by default during system operation. The addition
 | ------ | ----------------------------- | --------- | ------------------------------------------------------------------ |
 | mem    | name="database_{{name}}"      | AutoGauge | The memory usage of DataRegion in DataNode, Unit: byte             |
 | mem    | name="chunkMetaData_{{name}}" | AutoGauge | The memory usage of chunkMetaData when writting TsFile, Unit: byte |
-| mem    | name="MultiLeaderConsensus"   | AutoGauge | The memory usage of MultiLeader consensus, Unit: byte              |
+| mem    | name="IoTConsensus"   | AutoGauge | The memory usage of MultiLeader consensus, Unit: byte              |
 
 ### 4.2.7. Task
 | Metric    | Tags                                              | Type      | Description                           |
diff --git a/docs/UserGuide/Reference/Common-Config-Manual.md b/docs/UserGuide/Reference/Common-Config-Manual.md
index d8ead0c7cf..7ece1a4ac3 100644
--- a/docs/UserGuide/Reference/Common-Config-Manual.md
+++ b/docs/UserGuide/Reference/Common-Config-Manual.md
@@ -57,12 +57,12 @@ Trigger way: The client sends the command(sql) `load configuration` to the IoTDB
 
 * schema\_region\_consensus\_protocol\_class
 
-|    Name     | schema\_region\_consensus\_protocol\_class                                                                                                   |
-| :---------: | :------------------------------------------------------------------------------------------------------------------------------------------- |
+|    Name     | schema\_region\_consensus\_protocol\_class             |
+| :---------: | :--------------------------------------: |
 | Description | Consensus protocol of schema replicas, SimpleConsensus could only be used in 1 replica,larger than 1 replicas could only use RatisConsensus |  |
-|    Type     | String                                                                                                                                       |
-|   Default   | org.apache.iotdb.consensus.simple.SimpleConsensus                                                                                            |
-|  Effective  | Only allowed to be modified in first start up                                                                                                |
+|    Type     | String                                                 |
+|   Default   | org.apache.iotdb.consensus.ratis.RatisConsensus      |
+|  Effective  | Only allowed to be modified in first start up         |
 
 * data\_replication\_factor
 
@@ -77,7 +77,7 @@ Trigger way: The client sends the command(sql) `load configuration` to the IoTDB
 
 |    Name     | data\_region\_consensus\_protocol\_class                                                                                                                      |
 | :---------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| Description | Consensus protocol of data replicas, SimpleConsensus could only be used in 1 replica,larger than 1 replicas could use MultiLeaderConsensus or RatisConsensus |
+| Description | Consensus protocol of data replicas, SimpleConsensus could only be used in 1 replica,larger than 1 replicas could use IoTConsensus or RatisConsensus |
 |    Type     | String                                                                                                                                                        |
 |   Default   | org.apache.iotdb.consensus.simple.SimpleConsensus                                                                                                             |
 |  Effective  | Only allowed to be modified in first start up                                                                                                                 |
diff --git a/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md b/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md
index 2daec75224..b88ea90c9f 100644
--- a/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md
+++ b/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md
@@ -178,7 +178,7 @@ Core 级别的监控指标在系统运行中默认开启,每一个 Core 级别
 | ------ | ----------------------------- | --------- | ------------------------------------------------- |
 | mem    | name="database_{{name}}"      | AutoGauge | DataNode内对应DataRegion的内存占用,单位为byte    |
 | mem    | name="chunkMetaData_{{name}}" | AutoGauge | 写入TsFile时的ChunkMetaData的内存占用,单位为byte |
-| mem    | name="MultiLeaderConsensus"   | AutoGauge | 弱一致性共识协议的内存占用,单位为byte            |
+| mem    | name="IoTConsensus"   | AutoGauge | 弱一致性共识协议的内存占用,单位为byte            |
 
 ### 4.2.7. 任务统计
 | Metric    | Tags                                              | Type      | Description        |
diff --git a/docs/zh/UserGuide/Reference/Common-Config-Manual.md b/docs/zh/UserGuide/Reference/Common-Config-Manual.md
index 37cf77ffe1..a2a5830ba9 100644
--- a/docs/zh/UserGuide/Reference/Common-Config-Manual.md
+++ b/docs/zh/UserGuide/Reference/Common-Config-Manual.md
@@ -62,7 +62,7 @@ IoTDB ConfigNode 和 DataNode 的通用配置参数位于 `conf` 目录下。
 | :----------: | :------------------------------------------------------------------------------------------- |
 |     描述     | 元数据副本的共识协议,1 副本时可以使用 SimpleConsensus 协议,多副本时只能使用 RatisConsensus |
 |     类型     | String                                                                                       |
-|    默认值    | org.apache.iotdb.consensus.simple.SimpleConsensus                                            |
+|    默认值    | org.apache.iotdb.consensus.ratis.RatisConsensus                                            |
 | 改后生效方式 | 仅允许在第一次启动服务前修改                                                                 |
 
 * data\_replication\_factor
@@ -78,9 +78,9 @@ IoTDB ConfigNode 和 DataNode 的通用配置参数位于 `conf` 目录下。
 
 |     名字     | data\_region\_consensus\_protocol\_class                                                                           |
 | :----------: | :----------------------------------------------------------------------------------------------------------------- |
-|     描述     | 数据副本的共识协议,1 副本时可以使用 SimpleConsensus 协议,多副本时可以使用 MultiLeaderConsensus 或 RatisConsensus |
+|     描述     | 数据副本的共识协议,1 副本时可以使用 SimpleConsensus 协议,多副本时可以使用 IoTConsensus 或 RatisConsensus |
 |     类型     | String                                                                                                             |
-|    默认值    | org.apache.iotdb.consensus.simple.SimpleConsensus                                                                  |
+|    默认值    | org.apache.iotdb.consensus.iot.IoTConsensus                                                                  |
 | 改后生效方式 | 仅允许在第一次启动服务前修改                                                                                       |
 
 ### 分区(负载均衡)配置
diff --git a/grafana-metrics-example/cluster/Apache IoTDB DataNode Dashboard v0.14.0.json b/grafana-metrics-example/cluster/Apache IoTDB DataNode Dashboard v0.14.0.json
index 4f5b44b4d0..a11643b4aa 100644
--- a/grafana-metrics-example/cluster/Apache IoTDB DataNode Dashboard v0.14.0.json	
+++ b/grafana-metrics-example/cluster/Apache IoTDB DataNode Dashboard v0.14.0.json	
@@ -334,7 +334,7 @@
           },
           "editorMode": "code",
           "exemplar": true,
-          "expr": "mem{instance=~\"$instance\", name!=\"MultiLeaderConsensus\"}",
+          "expr": "mem{instance=~\"$instance\", name!=\"IoTConsensus\"}",
           "interval": "",
           "legendFormat": "{{name}}",
           "range": true,
@@ -1057,7 +1057,7 @@
           },
           "editorMode": "code",
           "exemplar": true,
-          "expr": "mem{name=\"MultiLeaderConsensus\"}",
+          "expr": "mem{name=\"IoTConsensus\"}",
           "interval": "",
           "legendFormat": "{{instance}}",
           "range": true,
diff --git a/node-commons/src/assembly/resources/conf/iotdb-common.properties b/node-commons/src/assembly/resources/conf/iotdb-common.properties
index 68a68e9e1f..4bcb805431 100644
--- a/node-commons/src/assembly/resources/conf/iotdb-common.properties
+++ b/node-commons/src/assembly/resources/conf/iotdb-common.properties
@@ -36,10 +36,10 @@
 # SchemaRegion consensus protocol type.
 # This parameter is unmodifiable after ConfigNode starts for the first time.
 # These consensus protocols are currently supported:
-# 1. org.apache.iotdb.consensus.simple.SimpleConsensus
-# 2. org.apache.iotdb.consensus.ratis.RatisConsensus
+# 1. org.apache.iotdb.consensus.ratis.RatisConsensus
+# 2. org.apache.iotdb.consensus.simple.SimpleConsensus
 # Datatype: string
-# schema_region_consensus_protocol_class=org.apache.iotdb.consensus.simple.SimpleConsensus
+# schema_region_consensus_protocol_class=org.apache.iotdb.consensus.ratis.RatisConsensus
 
 # Default number of data replicas
 # Can not be changed after the first start
@@ -53,7 +53,7 @@
 # 2. org.apache.iotdb.consensus.iot.IoTConsensus
 # 3. org.apache.iotdb.consensus.ratis.RatisConsensus
 # Datatype: string
-# data_region_consensus_protocol_class=org.apache.iotdb.consensus.simple.SimpleConsensus
+# data_region_consensus_protocol_class=org.apache.iotdb.consensus.iot.IoTConsensus
 
 ####################
 ### Partition (Load balancing) configuration