Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add English version of upgrade #1824

Merged
merged 7 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/en/maintain/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ Maintenance

.. toctree::
:maxdepth: 1

cli

upgrade
58 changes: 58 additions & 0 deletions docs/en/maintain/upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Upgrade

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

* Stop nameserver
```bash
sh bin/start.sh stop nameserver
```
* 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
```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 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
```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 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

* Update the java client version number in the pom file
* Update dependencies