From 8edeecb0a14f74ba6797da6aadc85b5a364a173e Mon Sep 17 00:00:00 2001 From: bxiiiiii <1551097460@qq.com> Date: Mon, 16 May 2022 21:00:24 +0800 Subject: [PATCH 1/4] add English version of upgrade --- docs/en/maintain/index.rst | 1 + docs/en/maintain/upgrade.md | 58 +++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 docs/en/maintain/upgrade.md diff --git a/docs/en/maintain/index.rst b/docs/en/maintain/index.rst index 63559e97efe..d3c5da8ec66 100644 --- a/docs/en/maintain/index.rst +++ b/docs/en/maintain/index.rst @@ -7,3 +7,4 @@ Maintenance cli + upgrade \ No newline at end of file diff --git a/docs/en/maintain/upgrade.md b/docs/en/maintain/upgrade.md new file mode 100644 index 00000000000..c090f633165 --- /dev/null +++ b/docs/en/maintain/upgrade.md @@ -0,0 +1,58 @@ +# Version Upgrade + +Service Impact of upgrade process: +* If the created table is a single copy, it is not readable and writable during the upgrade process +* If the created table is multi-replica, the read request on the upgraded node will fail briefly, and the write request will have a small amount of data loss.If short read failures are not tolerated, execute offlineendpoint before stopping each tablet node. If a small amount of write loss cannot be tolerated, write operations need to be stopped during the upgrade process + +## 1. Upgrade nameserver + +* Stop nameserver + ```bash + sh bin/start.sh stop nameserver + ``` +* Backup old version bin and conf directories +* Download new version bin and conf +* Compare the configuration file diff and modify the necessary configuration, such as endpoint, zk_cluster, etc +* Start nameserver + ```bash + sh bin/start.sh start nameserver + ``` +* Repeat the above steps for the remaining nameservers + +## 2. Upgrade tablet + +* Stop tablet + ```bash + sh bin/start.sh stop tablet + ``` +* Backup old version bin and conf directories +* Download new version bin and conf +* Compare the configuration file diff and modify the necessary configuration, such as endpoint, zk_cluster, etc +* Start nameserver + ```bash + sh bin/start.sh start tablet + ``` +* If auto_failover is closed, you must connect to the ns client and perform the following operations to restore data. **The endpoint after the command is the endpoint of the restarted node** + * offlineendpoint endpoint + * recoverendpoint endpoint + +``` +$ ./bin/openmldb --zk_cluster=172.27.128.31:8090,172.27.128.32:8090,172.27.128.33:8090 --zk_root_path=/openmldb_cluster --role=ns_client +> offlineendpoint 172.27.128.32:8541 +offline endpoint ok +> recoverendpoint 172.27.128.32:8541 +recover endpoint ok +``` + +### Confirmation of Upgrade Result +* showopstatus command checks whether all operations are kDone, and if there is a kFailed task, check the log to troubleshoot the cause +* showtable to see if the status of all shards is yes + +After a tablet node is upgraded, repeat the above steps for other tablets. \(**You must wait until the data is synchronized before upgrading the next node**\) + +After all nodes are upgraded, resume write operations, and run the showtable command to check whether the master-slave offset has increased + +## 3. Upgrade Java Client + +* Update the java client version number in the pom file +* Update dependencies \ No newline at end of file From 1aae3fe87a9bbe5314a4beb14e97633b34b29d13 Mon Sep 17 00:00:00 2001 From: bxiiiiii <1551097460@qq.com> Date: Wed, 18 May 2022 12:07:31 +0800 Subject: [PATCH 2/4] update English version of upgrade --- docs/en/maintain/index.rst | 1 - docs/en/maintain/upgrade.md | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/en/maintain/index.rst b/docs/en/maintain/index.rst index d3c5da8ec66..cf7b042b5f4 100644 --- a/docs/en/maintain/index.rst +++ b/docs/en/maintain/index.rst @@ -6,5 +6,4 @@ Maintenance :maxdepth: 1 cli - upgrade \ No newline at end of file diff --git a/docs/en/maintain/upgrade.md b/docs/en/maintain/upgrade.md index c090f633165..0cf85b8a8fe 100644 --- a/docs/en/maintain/upgrade.md +++ b/docs/en/maintain/upgrade.md @@ -1,6 +1,6 @@ -# Version Upgrade +# Upgrade -Service Impact of upgrade process: +Here is the impact when upgrading OpenMLDB: * If the created table is a single copy, it is not readable and writable during the upgrade process * If the created table is multi-replica, the read request on the upgraded node will fail briefly, and the write request will have a small amount of data loss.If short read failures are not tolerated, execute offlineendpoint before stopping each tablet node. If a small amount of write loss cannot be tolerated, write operations need to be stopped during the upgrade process @@ -10,7 +10,7 @@ Service Impact of upgrade process: ```bash sh bin/start.sh stop nameserver ``` -* Backup old version bin and conf directories +* Backup the old versions directories `bin` and `conf` * Download new version bin and conf * Compare the configuration file diff and modify the necessary configuration, such as endpoint, zk_cluster, etc * Start nameserver @@ -25,7 +25,7 @@ Service Impact of upgrade process: ```bash sh bin/start.sh stop tablet ``` -* Backup old version bin and conf directories +* Backup the old versions directories `bin` and `conf` * Download new version bin and conf * Compare the configuration file diff and modify the necessary configuration, such as endpoint, zk_cluster, etc * Start nameserver @@ -46,7 +46,7 @@ recover endpoint ok ### Confirmation of Upgrade Result * showopstatus command checks whether all operations are kDone, and if there is a kFailed task, check the log to troubleshoot the cause -* showtable to see if the status of all shards is yes +* showtable to see if the status of all partitions is yes After a tablet node is upgraded, repeat the above steps for other tablets. \(**You must wait until the data is synchronized before upgrading the next node**\) From 96577dac7e7dc5822f44cb0143afc90b3e9219ed Mon Sep 17 00:00:00 2001 From: bxiiiiii <1551097460@qq.com> Date: Thu, 19 May 2022 16:13:39 +0800 Subject: [PATCH 3/4] remove blank line --- docs/en/maintain/index.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/en/maintain/index.rst b/docs/en/maintain/index.rst index cf7b042b5f4..c852c52f2d6 100644 --- a/docs/en/maintain/index.rst +++ b/docs/en/maintain/index.rst @@ -4,6 +4,5 @@ Maintenance .. toctree:: :maxdepth: 1 - cli upgrade \ No newline at end of file From ba84dd4b7727ac3fe30e1070e7fb28398bcd5757 Mon Sep 17 00:00:00 2001 From: LU MIAN <3725932+lumianph@users.noreply.github.com> Date: Thu, 19 May 2022 22:25:18 +0800 Subject: [PATCH 4/4] Update upgrade.md --- docs/en/maintain/upgrade.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/en/maintain/upgrade.md b/docs/en/maintain/upgrade.md index 0cf85b8a8fe..8ae0e130d16 100644 --- a/docs/en/maintain/upgrade.md +++ b/docs/en/maintain/upgrade.md @@ -4,7 +4,7 @@ Here is the impact when upgrading OpenMLDB: * If the created table is a single copy, it is not readable and writable during the upgrade process * If the created table is multi-replica, the read request on the upgraded node will fail briefly, and the write request will have a small amount of data loss.If short read failures are not tolerated, execute offlineendpoint before stopping each tablet node. If a small amount of write loss cannot be tolerated, write operations need to be stopped during the upgrade process -## 1. Upgrade nameserver +## 1. Upgrade Nameserver * Stop nameserver ```bash @@ -19,7 +19,9 @@ Here is the impact when upgrading OpenMLDB: ``` * Repeat the above steps for the remaining nameservers -## 2. Upgrade tablet +## 2. Upgrade Tablets + +### 2.1. Steps of Upgrading Tablets * Stop tablet ```bash @@ -44,15 +46,15 @@ offline endpoint ok recover endpoint ok ``` -### Confirmation of Upgrade Result -* showopstatus command checks whether all operations are kDone, and if there is a kFailed task, check the log to troubleshoot the cause -* showtable to see if the status of all partitions is yes +### 2.2. Confirmation of Upgrade Result +* `showopstatus` command checks whether all operations are `kDone`, and if there is a `kFailed` task, check the log to troubleshoot the cause +* `showtable` to see if the status of all partitions is yes After a tablet node is upgraded, repeat the above steps for other tablets. \(**You must wait until the data is synchronized before upgrading the next node**\) After all nodes are upgraded, resume write operations, and run the showtable command to check whether the master-slave offset has increased -## 3. Upgrade Java Client +## 3. Upgrade the Java Client * Update the java client version number in the pom file -* Update dependencies \ No newline at end of file +* Update dependencies