From 6f9de45674737353766fdfe90fe38c30c07bf5be Mon Sep 17 00:00:00 2001 From: leto-bbq Date: Thu, 27 Aug 2026 17:19:42 +0800 Subject: [PATCH] [V2.0.11] Support passing regionId list in extend region and remove region statements --- .../Maintenance-commands_apache.md | 51 +++++++++++++++++-- .../Maintenance-commands_apache.md | 50 ++++++++++++++++-- .../Maintenance-commands_apache.md | 51 +++++++++++++++++-- .../Maintenance-commands_apache.md | 50 ++++++++++++++++-- .../Maintenance-statement_apache.md | 50 ++++++++++++++++-- .../Maintenance-statement_apache.md | 50 ++++++++++++++++-- .../Maintenance-statement_apache.md | 50 ++++++++++++++++-- .../Maintenance-statement_apache.md | 50 ++++++++++++++++-- 8 files changed, 370 insertions(+), 32 deletions(-) diff --git a/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_apache.md b/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_apache.md index 7a434b4ba..00f426415 100644 --- a/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_apache.md +++ b/src/UserGuide/Master/Table/User-Manual/Maintenance-commands_apache.md @@ -822,9 +822,51 @@ localOrClusterMode IoTDB> STOP REPAIR DATA ON CLUSTER; ``` -## 5. Query Termination +## 5. Replica Repair -### 5.1 Terminating Queries +> Since V2.0.11, this feature supports passing in a regionId list to process multiple regions at once. + +### 5.1 Manual Scale-Out + +**Description**: Extends the specified Regions to the specified DataNode. + +**Syntax**: + +```SQL +extendRegionStatement + : EXTEND REGION (, )* TO + ; +``` + +**Example**: + +```SQL +IoTDB> EXTEND REGION 1,2,3 TO 3; +``` + +### 5.2 Manual Scale-In + +**Description**: Removes the specified Regions from the specified DataNode. + +> Note: Manual scale-in can reduce the number of replicas to 1 at most, and cannot reduce it to 0. + +**Syntax**: + +```SQL +removeRegionStatement + : REMOVE REGION (, )* FROM + ; +``` + +**Example**: + +```SQL +IoTDB> REMOVE REGION 1,2,3 FROM 2; +``` + +## 6. Query Termination + +### 6.1 Terminating Queries **Description**: Terminates one or more running queries. @@ -858,8 +900,9 @@ Terminate all queries: IoTDB> KILL ALL QUERIES; ``` -## 6. Query Debugging -### 6.1 DEBUG SQL +## 7. Query Debugging + +### 7.1 DEBUG SQL **Definition**: Add the `DEBUG` keyword at the beginning of an SQL query statement. During execution, debug logs will be output, including the underlying file scan information involved in the query. diff --git a/src/UserGuide/Master/Tree/User-Manual/Maintenance-commands_apache.md b/src/UserGuide/Master/Tree/User-Manual/Maintenance-commands_apache.md index d232191a5..b321de681 100644 --- a/src/UserGuide/Master/Tree/User-Manual/Maintenance-commands_apache.md +++ b/src/UserGuide/Master/Tree/User-Manual/Maintenance-commands_apache.md @@ -588,9 +588,51 @@ localOrClusterMode IoTDB> STOP REPAIR DATA ON CLUSTER; ``` -## 5. Query Termination +## 5. Replica Repair -### 5.1 Terminating Queries +> Since V2.0.11, this feature supports passing in a regionId list to process multiple regions at once. + +### 5.1 Manual Scale-Out + +**Description**: Extends the specified Regions to the specified DataNode. + +**Syntax**: + +```SQL +extendRegionStatement + : EXTEND REGION (, )* TO + ; +``` + +**Example**: + +```SQL +IoTDB> EXTEND REGION 1,2,3 TO 3; +``` + +### 5.2 Manual Scale-In + +**Description**: Removes the specified Regions from the specified DataNode. + +> Note: Manual scale-in can reduce the number of replicas to 1 at most, and cannot reduce it to 0. + +**Syntax**: + +```SQL +removeRegionStatement + : REMOVE REGION (, )* FROM + ; +``` + +**Example**: + +```SQL +IoTDB> REMOVE REGION 1,2,3 FROM 2; +``` + +## 6. Query Termination + +### 6.1 Terminating Queries **Description**: Terminates one or more running queries. @@ -624,9 +666,9 @@ Terminate all queries: IoTDB> KILL ALL QUERIES; ``` -## 6. Query Debugging +## 7. Query Debugging -### 6.1 DEBUG SQL +### 7.1 DEBUG SQL **Definition**: Add the `DEBUG` keyword at the beginning of an SQL query statement. During execution, debug logs will be output, including underlying file scan information involved in the query. diff --git a/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_apache.md b/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_apache.md index 510e836d5..18c91392a 100644 --- a/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_apache.md +++ b/src/UserGuide/latest-Table/User-Manual/Maintenance-commands_apache.md @@ -822,9 +822,51 @@ localOrClusterMode IoTDB> STOP REPAIR DATA ON CLUSTER; ``` -## 5. Query Termination +## 5. Replica Repair -### 5.1 Terminating Queries +> Since V2.0.11, this feature supports passing in a regionId list to process multiple regions at once. + +### 5.1 Manual Scale-Out + +**Description**: Extends the specified Regions to the specified DataNode. + +**Syntax**: + +```SQL +extendRegionStatement + : EXTEND REGION (, )* TO + ; +``` + +**Example**: + +```SQL +IoTDB> EXTEND REGION 1,2,3 TO 3; +``` + +### 5.2 Manual Scale-In + +**Description**: Removes the specified Regions from the specified DataNode. + +> Note: Manual scale-in can reduce the number of replicas to 1 at most, and cannot reduce it to 0. + +**Syntax**: + +```SQL +removeRegionStatement + : REMOVE REGION (, )* FROM + ; +``` + +**Example**: + +```SQL +IoTDB> REMOVE REGION 1,2,3 FROM 2; +``` + +## 6. Query Termination + +### 6.1 Terminating Queries **Description**: Terminates one or more running queries. @@ -858,8 +900,9 @@ Terminate all queries: IoTDB> KILL ALL QUERIES; ``` -## 6. Query Debugging -### 6.1 DEBUG SQL +## 7. Query Debugging + +### 7.1 DEBUG SQL **Definition**: Add the `DEBUG` keyword at the beginning of an SQL query statement. During execution, debug logs will be output, including the underlying file scan information involved in the query. diff --git a/src/UserGuide/latest/User-Manual/Maintenance-commands_apache.md b/src/UserGuide/latest/User-Manual/Maintenance-commands_apache.md index d232191a5..b321de681 100644 --- a/src/UserGuide/latest/User-Manual/Maintenance-commands_apache.md +++ b/src/UserGuide/latest/User-Manual/Maintenance-commands_apache.md @@ -588,9 +588,51 @@ localOrClusterMode IoTDB> STOP REPAIR DATA ON CLUSTER; ``` -## 5. Query Termination +## 5. Replica Repair -### 5.1 Terminating Queries +> Since V2.0.11, this feature supports passing in a regionId list to process multiple regions at once. + +### 5.1 Manual Scale-Out + +**Description**: Extends the specified Regions to the specified DataNode. + +**Syntax**: + +```SQL +extendRegionStatement + : EXTEND REGION (, )* TO + ; +``` + +**Example**: + +```SQL +IoTDB> EXTEND REGION 1,2,3 TO 3; +``` + +### 5.2 Manual Scale-In + +**Description**: Removes the specified Regions from the specified DataNode. + +> Note: Manual scale-in can reduce the number of replicas to 1 at most, and cannot reduce it to 0. + +**Syntax**: + +```SQL +removeRegionStatement + : REMOVE REGION (, )* FROM + ; +``` + +**Example**: + +```SQL +IoTDB> REMOVE REGION 1,2,3 FROM 2; +``` + +## 6. Query Termination + +### 6.1 Terminating Queries **Description**: Terminates one or more running queries. @@ -624,9 +666,9 @@ Terminate all queries: IoTDB> KILL ALL QUERIES; ``` -## 6. Query Debugging +## 7. Query Debugging -### 6.1 DEBUG SQL +### 7.1 DEBUG SQL **Definition**: Add the `DEBUG` keyword at the beginning of an SQL query statement. During execution, debug logs will be output, including underlying file scan information involved in the query. diff --git a/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_apache.md b/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_apache.md index 3ac4ee632..26f3f7627 100644 --- a/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_apache.md +++ b/src/zh/UserGuide/Master/Table/User-Manual/Maintenance-statement_apache.md @@ -847,9 +847,51 @@ localOrClusterMode IoTDB> STOP REPAIR DATA ON CLUSTER; ``` -## 5. 终止查询 +## 5. 副本修复 -### 5.1 主动终止查询 +> 该功能从 V2.0.11 起支持传入 regionId list ,一次处理多个 region。 + +### 5.1 手动扩容 + +**含义**:将指定 Region 扩容到指定 DataNode 上。 + +#### 语法: + +```SQL +extendRegionStatement + : EXTEND REGION (, )* TO + ; +``` + +#### 示例: + +```SQL +IoTDB> EXTEND REGION 1,2,3 TO 3; +``` + +### 5.2 手动缩容 + +**含义**:从指定 DataNode 上移除指定 Region。 + +> 注意:手动缩容至多将副本数缩减至 1 ,不能缩减至 0 。 + +#### 语法: + +```SQL +removeRegionStatement + : REMOVE REGION (, )* FROM + ; +``` + +#### 示例: + +```SQL +IoTDB> REMOVE REGION 1,2,3 FROM 2; +``` + +## 6. 终止查询 + +### 6.1 主动终止查询 **含义**:使用该命令主动地终止查询。 @@ -878,9 +920,9 @@ IoTDB> KILL QUERY 20250108_101015_00000_1; -- 终止指定query IoTDB> KILL ALL QUERIES; -- 终止所有query ``` -## 6. 调试查询 +## 7. 调试查询 -### 6.1 DEBUG SQL +### 7.1 DEBUG SQL **​含义:​**在 SQL 查询语句开头添加 debug 关键字,执行时将输出 debug 日志,包括涉及到的底层文件 scan 信息。 diff --git a/src/zh/UserGuide/Master/Tree/User-Manual/Maintenance-statement_apache.md b/src/zh/UserGuide/Master/Tree/User-Manual/Maintenance-statement_apache.md index 523b89f9a..417ae6bac 100644 --- a/src/zh/UserGuide/Master/Tree/User-Manual/Maintenance-statement_apache.md +++ b/src/zh/UserGuide/Master/Tree/User-Manual/Maintenance-statement_apache.md @@ -611,9 +611,51 @@ localOrClusterMode IoTDB> STOP REPAIR DATA ON CLUSTER; ``` -## 5. 终止查询 +## 5. 副本修复 -### 5.1 主动终止查询 +> 该功能从 V2.0.11 起支持传入 regionId list ,一次处理多个 region。 + +### 5.1 手动扩容 + +**含义**:将指定 Region 扩容到指定 DataNode 上。 + +#### 语法: + +```SQL +extendRegionStatement + : EXTEND REGION (, )* TO + ; +``` + +#### 示例: + +```SQL +IoTDB> EXTEND REGION 1,2,3 TO 3; +``` + +### 5.2 手动缩容 + +**含义**:从指定 DataNode 上移除指定 Region。 + +> 注意:手动缩容至多将副本数缩减至 1 ,不能缩减至 0 。 + +#### 语法: + +```SQL +removeRegionStatement + : REMOVE REGION (, )* FROM + ; +``` + +#### 示例: + +```SQL +IoTDB> REMOVE REGION 1,2,3 FROM 2; +``` + +## 6. 终止查询 + +### 6.1 主动终止查询 **含义**:使用该命令主动地终止查询。 @@ -643,9 +685,9 @@ IoTDB> KILL ALL QUERIES; -- 终止所有query ``` -## 6. 调试查询 +## 7. 调试查询 -### 6.1 DEBUG SQL +### 7.1 DEBUG SQL **​含义:​**在 SQL 查询语句开头添加 debug 关键字,执行时将输出 debug 日志,包括涉及到的底层文件 scan 信息。 diff --git a/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_apache.md b/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_apache.md index 2eef2c695..0931f2427 100644 --- a/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_apache.md +++ b/src/zh/UserGuide/latest-Table/User-Manual/Maintenance-statement_apache.md @@ -847,9 +847,51 @@ localOrClusterMode IoTDB> STOP REPAIR DATA ON CLUSTER; ``` -## 5. 终止查询 +## 5. 副本修复 -### 5.1 主动终止查询 +> 该功能从 V2.0.11 起支持传入 regionId list ,一次处理多个 region。 + +### 5.1 手动扩容 + +**含义**:将指定 Region 扩容到指定 DataNode 上。 + +#### 语法: + +```SQL +extendRegionStatement + : EXTEND REGION (, )* TO + ; +``` + +#### 示例: + +```SQL +IoTDB> EXTEND REGION 1,2,3 TO 3; +``` + +### 5.2 手动缩容 + +**含义**:从指定 DataNode 上移除指定 Region。 + +> 注意:手动缩容至多将副本数缩减至 1 ,不能缩减至 0 。 + +#### 语法: + +```SQL +removeRegionStatement + : REMOVE REGION (, )* FROM + ; +``` + +#### 示例: + +```SQL +IoTDB> REMOVE REGION 1,2,3 FROM 2; +``` + +## 6. 终止查询 + +### 6.1 主动终止查询 **含义**:使用该命令主动地终止查询。 @@ -878,9 +920,9 @@ IoTDB> KILL QUERY 20250108_101015_00000_1; -- 终止指定query IoTDB> KILL ALL QUERIES; -- 终止所有query ``` -## 6. 调试查询 +## 7. 调试查询 -### 6.1 DEBUG SQL +### 7.1 DEBUG SQL **​含义:​**在 SQL 查询语句开头添加 debug 关键字,执行时将输出 debug 日志,包括涉及到的底层文件 scan 信息。 diff --git a/src/zh/UserGuide/latest/User-Manual/Maintenance-statement_apache.md b/src/zh/UserGuide/latest/User-Manual/Maintenance-statement_apache.md index 523b89f9a..417ae6bac 100644 --- a/src/zh/UserGuide/latest/User-Manual/Maintenance-statement_apache.md +++ b/src/zh/UserGuide/latest/User-Manual/Maintenance-statement_apache.md @@ -611,9 +611,51 @@ localOrClusterMode IoTDB> STOP REPAIR DATA ON CLUSTER; ``` -## 5. 终止查询 +## 5. 副本修复 -### 5.1 主动终止查询 +> 该功能从 V2.0.11 起支持传入 regionId list ,一次处理多个 region。 + +### 5.1 手动扩容 + +**含义**:将指定 Region 扩容到指定 DataNode 上。 + +#### 语法: + +```SQL +extendRegionStatement + : EXTEND REGION (, )* TO + ; +``` + +#### 示例: + +```SQL +IoTDB> EXTEND REGION 1,2,3 TO 3; +``` + +### 5.2 手动缩容 + +**含义**:从指定 DataNode 上移除指定 Region。 + +> 注意:手动缩容至多将副本数缩减至 1 ,不能缩减至 0 。 + +#### 语法: + +```SQL +removeRegionStatement + : REMOVE REGION (, )* FROM + ; +``` + +#### 示例: + +```SQL +IoTDB> REMOVE REGION 1,2,3 FROM 2; +``` + +## 6. 终止查询 + +### 6.1 主动终止查询 **含义**:使用该命令主动地终止查询。 @@ -643,9 +685,9 @@ IoTDB> KILL ALL QUERIES; -- 终止所有query ``` -## 6. 调试查询 +## 7. 调试查询 -### 6.1 DEBUG SQL +### 7.1 DEBUG SQL **​含义:​**在 SQL 查询语句开头添加 debug 关键字,执行时将输出 debug 日志,包括涉及到的底层文件 scan 信息。