Skip to content

Commit 5a13ee6

Browse files
committed
add SYSTEM TRANSFER LEADER command
1 parent 4ef3760 commit 5a13ee6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

docs/sql-system-transfer-leader.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SYSTEM TRANSFER LEADER
2+
Transfer the leader of a materialized view to another node in the cluster.
3+
4+
```sql
5+
SYSTEM TRANSFER LEADER [db.]materialized_view_name shard_id FROM source_node_id TO target_node_id;
6+
```
7+
8+
For example:
9+
10+
```sql
11+
SYSTEM TRANSFER LEADER mv1 0 FROM 3 TO 1;
12+
```
13+
14+
:::info
15+
This feature is only available in Timeplus Enterprise v2.5.x or above. This SQL need to be run on the lead node of the cluster.
16+
:::

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ const sidebars = {
351351
"sql-show-streams",
352352
"sql-system-pause",
353353
"sql-system-resume",
354+
"sql-system-transfer-leader",
354355
"sql-truncate-stream",
355356
"sql-use",
356357
],

0 commit comments

Comments
 (0)