You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Tree/User-Manual/Maintennance.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,6 +346,75 @@ Observing the results, we found that it is because the query did not add a time
346
346
347
347
The final optimization plan is: Add a time filtering condition to avoid a full table scan.
348
348
349
+
## Region Migration
350
+
351
+
The Region migration feature has operating costs. It is recommended to read this section completely before using this feature. If you have any questions about the solution design, please contact the IoTDB team for technical support.
352
+
353
+
### Feature introduction
354
+
355
+
IoTDB is a distributed database.
356
+
The balanced distribution of data plays an important role in the load balance of disk space
357
+
and write pressure in the cluster.
358
+
Region is the basic unit for distributed storage of data in IoTDB cluster.
359
+
Specific concept can be seen in [region](../../Background-knowledge/Cluster-Concept.md).
360
+
361
+
In cluster normal operation, IoTDB kernel will automatically load balance the data, but in the cluster new join DataNode node, DataNode where the machine hard disk damage needs to recover data and other scenarios, will involve the region of manual migration, in order to achieve more fine adjustment of the cluster load goal.
362
+
363
+
Here is a schematic diagram of the region migration process :
1. Region migration is supported only 1.3.3 IoTDB and later.
370
+
2. IoTConsensus and Ratis protocols ( `schema_region_consensus_protocol_class `and `data_region_consensus_protocol_class `in `iotdb-system.properties `) are currently supported .
371
+
3. Region migration requires system resources such as hard disk and internet bandwidth, and although the process does not block reads and writes , it may affect read and write speeds .
372
+
4. The region migration process will block the deletion of the WAL file of this consensus group. If the total number of WAL files reaches `wal_file_size_threshold_in_byte `, it will block writing.
373
+
374
+
### Instructions for use
375
+
376
+
-**Grammar definition** :
377
+
```SQL
378
+
migrateRegion
379
+
: MIGRATE REGION regionId=INTEGER_LITERAL FROM fromId=INTEGER_LITERAL TO toId=INTEGER_LITERAL
380
+
;
381
+
```
382
+
-**Meaning** : Migrates a region from one DataNode to another.
383
+
-**Example** : Migrating region 1from DataNode 2 to DataNode 3:
384
+
```SQL
385
+
IoTDB> migrate region 1 from 2 to 3
386
+
Msg: The statement is executed successfully.
387
+
```
388
+
389
+
"The statement is executed successfully" only represents the successful submission of the region migration task, not the completion of execution. The execution status of the task can be viewed through the CLI command `show regions `.
390
+
-**Related configuration** :
391
+
- Migration speed control : modify `iotdb-system.properties `parameters `region_migration_speed_limit_bytes_per_second `control region migration speed.
392
+
-**Time cost estimation** :
393
+
- If there are no concurrent writes during the migration process, the time consumption can be simply estimated by dividing the region data volume by the data transfer speed. For example, for a 1TB region, the hard disk internet bandwidth and speed limit parameters jointly determine that the data transfer speed is 100MB/s, so it takes about 3 hours to complete the migration.
394
+
- If there are concurrent writes in the migration process, the time consumption will increase, and the specific time consumption depends on various factors such as write pressure and system resources. It can be simply estimated as`no concurrent write time × 1.5 `.
395
+
-**Migration progress observation** : During the migration process, the state changes can be observed through the CLI command `show regions `. Taking the 2 replicas as an example, the state of the consensus group where the region is located will go through the following process:
396
+
- Before migration starts: `Running `, `Running `.
397
+
- Expansion phase: `Running `, `Running `, `Adding `. Due to the large number of file transfers involved, it may take a long time. If using IoTConsensus, the specific file transfer progress can be searched in the DataNode log `[SNAPSHOT TRANSMISSION] `.
398
+
- Stages: `Removing `, `Running `, `Running `.
399
+
- Migration complete: `Running `, `Running `.
400
+
401
+
Taking the expansion phase as an example, the result of `show regions `may be:
Copy file name to clipboardExpand all lines: src/UserGuide/latest/User-Manual/Maintennance.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,6 +346,75 @@ Observing the results, we found that it is because the query did not add a time
346
346
347
347
The final optimization plan is: Add a time filtering condition to avoid a full table scan.
348
348
349
+
## Region Migration
350
+
351
+
The Region migration feature has operating costs. It is recommended to read this section completely before using this feature. If you have any questions about the solution design, please contact the IoTDB team for technical support.
352
+
353
+
### Feature introduction
354
+
355
+
IoTDB is a distributed database.
356
+
The balanced distribution of data plays an important role in the load balance of disk space
357
+
and write pressure in the cluster.
358
+
Region is the basic unit for distributed storage of data in IoTDB cluster.
359
+
Specific concept can be seen in [region](../../Background-knowledge/Cluster-Concept.md).
360
+
361
+
In cluster normal operation, IoTDB kernel will automatically load balance the data, but in the cluster new join DataNode node, DataNode where the machine hard disk damage needs to recover data and other scenarios, will involve the region of manual migration, in order to achieve more fine adjustment of the cluster load goal.
362
+
363
+
Here is a schematic diagram of the region migration process :
1. Region migration is supported only 1.3.3 IoTDB and later.
370
+
2. IoTConsensus and Ratis protocols ( `schema_region_consensus_protocol_class `and `data_region_consensus_protocol_class `in `iotdb-system.properties `) are currently supported .
371
+
3. Region migration requires system resources such as hard disk and internet bandwidth, and although the process does not block reads and writes , it may affect read and write speeds .
372
+
4. The region migration process will block the deletion of the WAL file of this consensus group. If the total number of WAL files reaches `wal_file_size_threshold_in_byte `, it will block writing.
373
+
374
+
### Instructions for use
375
+
376
+
-**Grammar definition** :
377
+
```SQL
378
+
migrateRegion
379
+
: MIGRATE REGION regionId=INTEGER_LITERAL FROM fromId=INTEGER_LITERAL TO toId=INTEGER_LITERAL
380
+
;
381
+
```
382
+
-**Meaning** : Migrates a region from one DataNode to another.
383
+
-**Example** : Migrating region 1from DataNode 2 to DataNode 3:
384
+
```SQL
385
+
IoTDB> migrate region 1 from 2 to 3
386
+
Msg: The statement is executed successfully.
387
+
```
388
+
389
+
"The statement is executed successfully" only represents the successful submission of the region migration task, not the completion of execution. The execution status of the task can be viewed through the CLI command `show regions `.
390
+
-**Related configuration** :
391
+
- Migration speed control : modify `iotdb-system.properties `parameters `region_migration_speed_limit_bytes_per_second `control region migration speed.
392
+
-**Time cost estimation** :
393
+
- If there are no concurrent writes during the migration process, the time consumption can be simply estimated by dividing the region data volume by the data transfer speed. For example, for a 1TB region, the hard disk internet bandwidth and speed limit parameters jointly determine that the data transfer speed is 100MB/s, so it takes about 3 hours to complete the migration.
394
+
- If there are concurrent writes in the migration process, the time consumption will increase, and the specific time consumption depends on various factors such as write pressure and system resources. It can be simply estimated as`no concurrent write time × 1.5 `.
395
+
-**Migration progress observation** : During the migration process, the state changes can be observed through the CLI command `show regions `. Taking the 2 replicas as an example, the state of the consensus group where the region is located will go through the following process:
396
+
- Before migration starts: `Running `, `Running `.
397
+
- Expansion phase: `Running `, `Running `, `Adding `. Due to the large number of file transfers involved, it may take a long time. If using IoTConsensus, the specific file transfer progress can be searched in the DataNode log `[SNAPSHOT TRANSMISSION] `.
398
+
- Stages: `Removing `, `Running `, `Running `.
399
+
- Migration complete: `Running `, `Running `.
400
+
401
+
Taking the expansion phase as an example, the result of `show regions `may be:
0 commit comments