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:46:00 UTC

[iotdb] branch change_default_consensus updated: fix multileader

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


The following commit(s) were added to refs/heads/change_default_consensus by this push:
     new b8c4de2b7c fix multileader
b8c4de2b7c is described below

commit b8c4de2b7c0f3394393a643d7ec53e73a565b885
Author: qiaojialin <64...@qq.com>
AuthorDate: Sun Nov 27 00:45:48 2022 +0800

    fix multileader
---
 docs/UserGuide/Monitor-Alert/Metric-Tool.md        | 24 +++++++++++-----------
 docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md     | 22 ++++++++++----------
 .../Apache IoTDB DataNode Dashboard v0.14.0.json   | 14 ++++++-------
 3 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/docs/UserGuide/Monitor-Alert/Metric-Tool.md b/docs/UserGuide/Monitor-Alert/Metric-Tool.md
index 4e6f15cbd0..3a8a676ad6 100644
--- a/docs/UserGuide/Monitor-Alert/Metric-Tool.md
+++ b/docs/UserGuide/Monitor-Alert/Metric-Tool.md
@@ -127,13 +127,13 @@ Core-level metrics are enabled by default during system operation. The addition
 | region   | name="{{ip}}:{{port}}",type="SchemaRegion" | Gauge     | The number of SchemaRegion in PartitionTable of specific node |
 | region   | name="{{ip}}:{{port}}",type="DataRegion"   | Gauge     | The number of DataRegion in PartitionTable of specific node   |
 
-### 4.2.3. MultiLeader
+### 4.2.3. IoTConsensus
 | Metric       | Tags                                                                                         | Type      | Description                                                           |
 | ------------ | -------------------------------------------------------------------------------------------- | --------- | --------------------------------------------------------------------- |
 | mutli_leader | name="logDispatcher-{{IP}}:{{Port}}", region="{{region}}", type="currentSyncIndex"           | AutoGauge | The sync index of synchronization thread in replica group             |
 | mutli_leader | name="logDispatcher-{{IP}}:{{Port}}", region="{{region}}", type="cachedRequestInMemoryQueue" | AutoGauge | The size of cache requests of synchronization thread in replica group |
-| mutli_leader | name="multiLeaderServerImpl", region="{{region}}", type="searchIndex"                        | AutoGauge | The write process of main process in replica group                    |
-| mutli_leader | name="multiLeaderServerImpl", region="{{region}}", type="safeIndex"                          | AutoGauge | The sync index of replica group                                       |
+| mutli_leader | name="IoTConsensusServerImpl", region="{{region}}", type="searchIndex"                        | AutoGauge | The write process of main process in replica group                    |
+| mutli_leader | name="IoTConsensusServerImpl", region="{{region}}", type="safeIndex"                          | AutoGauge | The sync index of replica group                                       |
 | stage        | name="multi_leader", region="{{region}}", type="getStateMachineLock"                         | Histogram | The time consumed to get statemachine lock in main process            |
 | stage        | name="multi_leader", region="{{region}}", type="checkingBeforeWrite"                         | Histogram | The time consumed to precheck before write in main process            |
 | stage        | name="multi_leader", region="{{region}}", type="writeStateMachine"                           | Histogram | The time consumed to write statemachine in main process               |
@@ -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="IoTConsensus"   | AutoGauge | The memory usage of MultiLeader consensus, Unit: byte              |
+| mem    | name="IoTConsensus"   | AutoGauge | The memory usage of IoTConsensus, Unit: byte              |
 
 ### 4.2.7. Task
 | Metric    | Tags                                              | Type      | Description                           |
@@ -453,18 +453,18 @@ When creating Grafana, you can select the json file you just downloaded to `Impo
 3. `Engine`:
    1. `Task number (pending and active)`: The number of tasks in different states in the system
    2. `The time consumed of tasking (pending and active)`: The time consumption of tasks in different states in the system
-4. `MultiLeader`:
-   1. `MultiLeader Used Memory`:The size of the memory used by multiLeader consensus
-   2. `MultiLeader Sync Index`:the searchIndex and safeIndex of region
-   3. `MultiLeader Overview`:The total sync lag and total size of buffered requests of node
+4. `IoTConsensus`:
+   1. `IoTConsensus Used Memory`:The size of the memory used by IoTConsensus consensus
+   2. `IoTConsensus Sync Index`:the searchIndex and safeIndex of region
+   3. `IoTConsensus Overview`:The total sync lag and total size of buffered requests of node
    4. `The time consumed of different stages(50%)`:The median  of the time consumed of different stages
    5. `The time consumed of different stages(75%)`:The upper quartile of the time consumed of different stages
    6. `The time consumed of different stages(100%)`:The max of the time consumed of different stages
-   7. `MultiLeader Search Index Rate`:The increasing rate of searchIndex of region
-   8. `MultiLeader Safe Index Rate`:The increasing rate of safeIndex of region
-   9. `MultiLeader LogDispatcher Request Size`:The number of requests buffered in logDispatcher
+   7. `IoTConsensus Search Index Rate`:The increasing rate of searchIndex of region
+   8. `IoTConsensus Safe Index Rate`:The increasing rate of safeIndex of region
+   9. `IoTConsensus LogDispatcher Request Size`:The number of requests buffered in logDispatcher
    10. `Sync Lag`:The sync lag of region
-   11. `Min Peer Sync Lag`:The sync lag between the searchIndex of multiLeaderServerImpl and the max currentSyncIndex of LogDispatcher
+   11. `Min Peer Sync Lag`:The sync lag between the searchIndex of IoTConsensusServerImpl and the max currentSyncIndex of LogDispatcher
    12. `Sync speed diff of Peers`:The sync lag between the max currentSyncIndex of LogDispatcher and the min currentSyncIndex of LogDispatcher
 5. `CPU`:
    1. `CPU Load`:The load of CPU
diff --git a/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md b/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md
index b88ea90c9f..8fcffba986 100644
--- a/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md
+++ b/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md
@@ -130,13 +130,13 @@ Core 级别的监控指标在系统运行中默认开启,每一个 Core 级别
 | region   | name="{{ip}}:{{port}}",type="SchemaRegion" | Gauge     | 分区表中对应节点上 DataRegion 总数量 |
 | region   | name="{{ip}}:{{port}}",type="DataRegion"   | Gauge     | 分区表中对应节点上 DataRegion 总数量 |
 
-### 4.2.3. 弱一致性共识协议统计
+### 4.2.3. IoT共识协议统计
 | Metric       | Tags                                                                                         | Type      | Description                      |
 | ------------ | -------------------------------------------------------------------------------------------- | --------- | -------------------------------- |
 | mutli_leader | name="logDispatcher-{{IP}}:{{Port}}", region="{{region}}", type="currentSyncIndex"           | AutoGauge | 副本组同步线程的当前同步进度     |
 | mutli_leader | name="logDispatcher-{{IP}}:{{Port}}", region="{{region}}", type="cachedRequestInMemoryQueue" | AutoGauge | 副本组同步线程缓存队列请求总大小 |
-| mutli_leader | name="multiLeaderServerImpl", region="{{region}}", type="searchIndex"                        | AutoGauge | 副本组主流程写入进度             |
-| mutli_leader | name="multiLeaderServerImpl", region="{{region}}", type="safeIndex"                          | AutoGauge | 副本组同步进度                   |
+| mutli_leader | name="IoTConsensusServerImpl", region="{{region}}", type="searchIndex"                        | AutoGauge | 副本组主流程写入进度             |
+| mutli_leader | name="IoTConsensusServerImpl", region="{{region}}", type="safeIndex"                          | AutoGauge | 副本组同步进度                   |
 | stage        | name="multi_leader", region="{{region}}", type="getStateMachineLock"                         | Histogram | 主流程获取状态机锁耗时           |
 | stage        | name="multi_leader", region="{{region}}", type="checkingBeforeWrite"                         | Histogram | 主流程写入状态机检查耗时         |
 | stage        | name="multi_leader", region="{{region}}", type="writeStateMachine"                           | Histogram | 主流程写入状态机耗时             |
@@ -178,7 +178,7 @@ Core 级别的监控指标在系统运行中默认开启,每一个 Core 级别
 | ------ | ----------------------------- | --------- | ------------------------------------------------- |
 | mem    | name="database_{{name}}"      | AutoGauge | DataNode内对应DataRegion的内存占用,单位为byte    |
 | mem    | name="chunkMetaData_{{name}}" | AutoGauge | 写入TsFile时的ChunkMetaData的内存占用,单位为byte |
-| mem    | name="IoTConsensus"   | AutoGauge | 弱一致性共识协议的内存占用,单位为byte            |
+| mem    | name="IoTConsensus"   | AutoGauge | IoT共识协议的内存占用,单位为byte            |
 
 ### 4.2.7. 任务统计
 | Metric    | Tags                                              | Type      | Description        |
@@ -448,16 +448,16 @@ static_configs:
 - `Engine`:引擎
   - `Task number(pending and active)`:系统中不同状态的任务个数
   - `The time consumed of tasking(pending and active)`:系统中不同状态的任务的耗时
-- `MultiLeader`:弱一致性共识协议
-  - `MultiLeader Used Memory`:弱一致性共识层使用的内存大小
-  - `MultiLeader Sync Index`:不同的Region的写入Index和同步Index
-  - `MultiLeader Overview`:不同节点的同步总差距、总缓存的请求个数
+- `IoTConsensus`:IoT共识协议
+  - `IoTConsensus Used Memory`:IoT共识层使用的内存大小
+  - `IoTConsensus Sync Index`:不同的Region的写入Index和同步Index
+  - `IoTConsensus Overview`:不同节点的同步总差距、总缓存的请求个数
   - `The time consumed of different stages(50%)`:不同阶段耗时的中位数
   - `The time consumed of different stages(75%)`:不同阶段耗时的上四分位数
   - `The time consumed of different stages(100%)`:不同阶段耗时的最大值
-  - `MultiLeader Search Index Rate`:不同region的写入Index的增长速度
-  - `MultiLeader Safe Index Rate`:不同region的同步Index的增长速度
-  - `MultiLeader LogDispatcher Request Size`:不同的LogDispatcherThread缓存的请求个数
+  - `IoTConsensus Search Index Rate`:不同region的写入Index的增长速度
+  - `IoTConsensus Safe Index Rate`:不同region的同步Index的增长速度
+  - `IoTConsensus LogDispatcher Request Size`:不同的LogDispatcherThread缓存的请求个数
   - `Sync Lag`:每个region的同步index差距
   - `Min Peer Sync Lag`:每个region的写入index和同步最快的LogDispatcherThread的同步index之间的差距
   - `Sync speed diff of Peers`:每个region中同步最快的LogDispatcherThread与同步最慢的LogDispatcherThread之间的同步index差距
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 a11643b4aa..c6842e3da5 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	
@@ -975,7 +975,7 @@
           "refId": "A"
         }
       ],
-      "title": "MultiLeader",
+      "title": "IoTConsensus",
       "type": "row"
     },
     {
@@ -1064,7 +1064,7 @@
           "refId": "A"
         }
       ],
-      "title": "MultiLeader Used Memory",
+      "title": "IoTConsensus Used Memory",
       "type": "timeseries"
     },
     {
@@ -1167,7 +1167,7 @@
           "refId": "B"
         }
       ],
-      "title": "MultiLeader Sync Index",
+      "title": "IoTConsensus Sync Index",
       "type": "timeseries"
     },
     {
@@ -1272,7 +1272,7 @@
           "refId": "B"
         }
       ],
-      "title": "MultiLeader Overview",
+      "title": "IoTConsensus Overview",
       "type": "timeseries"
     },
     {
@@ -1633,7 +1633,7 @@
           "refId": "A"
         }
       ],
-      "title": "MultiLeader Search Index Rate",
+      "title": "IoTConsensus Search Index Rate",
       "type": "timeseries"
     },
     {
@@ -1726,7 +1726,7 @@
           "refId": "A"
         }
       ],
-      "title": "MultiLeader Safe Index Rate",
+      "title": "IoTConsensus Safe Index Rate",
       "type": "timeseries"
     },
     {
@@ -1813,7 +1813,7 @@
           "refId": "A"
         }
       ],
-      "title": "MultiLeader LogDispatcher Request Size",
+      "title": "IoTConsensus LogDispatcher Request Size",
       "type": "timeseries"
     },
     {