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

[upgrade] add docs for upgrading storage&compute decoupling #1513

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dataroaring
Copy link
Contributor

Versions

  • dev
  • 3.0
  • 2.1
  • 2.0

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built

Comment on lines +1 to +192
```shell
cp ${RECYCLER_PACKAGE_DIR}/bin ${RECYCLER_HOME}/bin
cp ${RECYCLER_PACKAGE_DIR}/lib ${RECYCLER_HOME}/lib
```

2.4. Start the new Recycler:
```shell
sh ${RECYCLER_HOME}/bin/start_ms.sh --recycler --daemon
```

2.5. Check status of the new Recycler:

Verify that the new MetaService is running and that a new version number is present in `${RECYCLER_HOME}/log/doris_cloud.out`.

### Step 3: Upgrade BE

Verify that all instances of MetaService and Recycler (if installed separately) have been upgraded.

Assuming the following environment variables:
- `${BE_HOME}`: Working directory of BE.
- `${BE_PACKAGE_DIR}`: Directory containing the new BE package.

Upgrade each BE instance by following these steps.

3.1. Stop the current BE:
```shell
cd ${BE_HOME}
sh bin/stop_be.sh
```

3.2. Backup the existing BE binaries:
```shell
mv ${BE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${BE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```

3.3. Deploy the new package:
```shell
cp ${BE_PACKAGE_DIR}/bin ${BE_HOME}/bin
cp ${BE_PACKAGE_DIR}/lib ${BE_HOME}/lib
```

3.4. Start the new BE:
```shell
sh ${BE_HOME}/bin/start_be.sh --daemon
```

3.5. Check status of the new BE:

Confirm that the new BE is running and operational with the new version. The status and version can be obtained using the following SQL.

```sql
show backends;
```

### Step 4: Upgrade FE

Verify that all instances of BE have been upgraded.

Assuming the following environment variables:
- `${FE_HOME}`: Working directory of FE.
- `${FE_PACKAGE_DIR}`: Directory containing the new FE package.

Upgrade the Frontend (FE) instances in the following order:
1. Observer FE nodes
2. Non-master FE nodes
3. Master FE node

Upgrade each Frontend (FE) node by following these steps.

4.1. Stop the current FE:
```shell
cd ${FE_HOME}
sh bin/stop_fe.sh
```

4.2. Backup the existing FE binaries:
```shell
mv ${FE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${FE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```

4.3. Deploy the new package:
```shell
cp ${FE_PACKAGE_DIR}/bin ${FE_HOME}/bin
cp ${FE_PACKAGE_DIR}/lib ${FE_HOME}/lib
```

4.4. Start the new FE:
```shell
sh ${FE_HOME}/bin/start_fe.sh --daemon
```

4.5. Check status of the new FE:

Confirm that the new FE is running and operational with the new version. The status and version can be obtained using the following SQL.

```sql
show frontends;
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
---
{
"title": "Upgrade",
"language": "en"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
This guide provides step-by-step instructions for upgrading Doris with a storage-compute decoupling architecture. The upgrade process involves three main steps: upgrading MetaService (MS), optionally upgrading Recycler, and finally upgrading the Frontend (FE) and Backend (BE) components.
## Prerequisites
Before proceeding with the upgrade, ensure the following:
1. **Process Check:** Verify that all Doris processes (MetaService, Frontend, Backend) are functioning correctly. If a Recycler is deployed independently, ensure that the Recycler process is also running normally.
## Upgrade Steps
### Step 1: Upgrade MetaService
Assuming the following environment variables:
- `${MS_HOME}`: Working directory of MetaService.
- `${MS_PACKAGE_DIR}`: Directory containing the new MetaService package.
Upgrade each MetaService instance by following these steps.
1.1. Stop the current MetaService:
```shell
cd ${MS_HOME}
sh bin/stop_ms.sh
```
1.2. Backup the existing MetaService binaries:
```shell
mv ${MS_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${MS_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```
1.3. Deploy the new package:
```shell
cp ${MS_PACKAGE_DIR}/bin ${MS_HOME}/bin
cp ${MS_PACKAGE_DIR}/lib ${MS_HOME}/lib
```
1.4. Start the new MetaService:
```shell
sh ${MS_HOME}/bin/start_ms.sh --daemon
```
1.5. Check status of the new MetaService:
Verify that the new MetaService is running and that a new version number is present in `${MS_HOME}/log/doris_cloud.out`.
### Step 2: Upgrade Recycler (Optional)
Assuming the following environment variables:
- `${RECYCLER_HOME}`: Working directory of Recycler
- `${MS_PACKAGE_DIR}`: Directory containing the new MetaService package, MetaService and Recycler use same package.
Upgrade each Recycler instance by following these steps.
2.1. Stop the current Recycler:
```shell
cd ${RECYCLER_HOME}
sh bin/stop_ms.sh
```
2.2. Backup the existing Recycler binaries:
```shell
mv ${RECYCLER_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${RECYCLER_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```
2.3. Deploy the new package:
```shell
cp ${RECYCLER_PACKAGE_DIR}/bin ${RECYCLER_HOME}/bin
cp ${RECYCLER_PACKAGE_DIR}/lib ${RECYCLER_HOME}/lib
```
2.4. Start the new Recycler:
```shell
sh ${RECYCLER_HOME}/bin/start_ms.sh --recycler --daemon
```
2.5. Check status of the new Recycler:
Verify that the new MetaService is running and that a new version number is present in `${RECYCLER_HOME}/log/doris_cloud.out`.
### Step 3: Upgrade BE
Verify that all instances of MetaService and Recycler (if installed separately) have been upgraded.
Assuming the following environment variables:
- `${BE_HOME}`: Working directory of BE.
- `${BE_PACKAGE_DIR}`: Directory containing the new BE package.
Upgrade each BE instance by following these steps.
3.1. Stop the current BE:
```shell
cd ${BE_HOME}
sh bin/stop_be.sh
```
3.2. Backup the existing BE binaries:
```shell
mv ${BE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${BE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```
3.3. Deploy the new package:
```shell
cp ${BE_PACKAGE_DIR}/bin ${BE_HOME}/bin
cp ${BE_PACKAGE_DIR}/lib ${BE_HOME}/lib
```
3.4. Start the new BE:
```shell
sh ${BE_HOME}/bin/start_be.sh --daemon
```
3.5. Check status of the new BE:
Confirm that the new BE is running and operational with the new version. The status and version can be obtained using the following SQL.
```sql
show backends;
```
### Step 4: Upgrade FE
Verify that all instances of BE have been upgraded.
Assuming the following environment variables:
- `${FE_HOME}`: Working directory of FE.
- `${FE_PACKAGE_DIR}`: Directory containing the new FE package.
Upgrade the Frontend (FE) instances in the following order:
1. Observer FE nodes
2. Non-master FE nodes
3. Master FE node
Upgrade each Frontend (FE) node by following these steps.
4.1. Stop the current FE:
```shell
cd ${FE_HOME}
sh bin/stop_fe.sh
```
4.2. Backup the existing FE binaries:
```shell
mv ${FE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${FE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```
4.3. Deploy the new package:
```shell
cp ${FE_PACKAGE_DIR}/bin ${FE_HOME}/bin
cp ${FE_PACKAGE_DIR}/lib ${FE_HOME}/lib
```
4.4. Start the new FE:
```shell
sh ${FE_HOME}/bin/start_fe.sh --daemon
```
4.5. Check status of the new FE:
Confirm that the new FE is running and operational with the new version. The status and version can be obtained using the following SQL.
```sql
show frontends;
```
---
{
"title": "Upgrade",
"language": "en"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## Overview
This guide provides step-by-step instructions for upgrading Doris using a storage-compute decoupling architecture (a.k.a. Cloud Mode). Upgrades should be performed using the recommended steps in this section for cluster upgrades. Doris cluster upgrades can be carried out using a **rolling upgrade** method, which does not require all cluster nodes to be shut down for the upgrade, greatly minimizing the impact on applications.
## Doris Version Description
Doris uses a three numbers separated by dots version format, which can be viewed using the following SQL:
\`\`\`sql
MySQL [(none)]> select @@version_comment;
+--------------------------------------------------------+
| @@version_comment |
+--------------------------------------------------------+
| Doris version doris-3.0.3-rc03-43f06a5e26 (Cloud Mode) |
+--------------------------------------------------------+
\`\`\`
> The 1st number in `3.0.3` represents the major version number, the 2nd number represents the minor version number, and the 3rd number represents the patch version number. In some cases, the version number may become a 4-numbers format, such as `2.0.2.1`, where the last number indicates an emergency bug fix version, which usually means that this patch version has some significant bugs.
>
> Doris has supported cloud mode deployment since version `3.0.0`. When deployed in this mode, the version number will have a Cloud Mode suffix. If started in the integrated storage and compute (a.k.a. Local) mode, there will be no such suffix.
Once Doris is deployed in cloud mode, it does not support switching back to local mode. Similarly, Doris in local mode does not support switching to cloud mode.
In principle, Doris supports upgrading from a lower version to a higher version and downgrading between patch versions. Downgrading between minor or major versions is not allowed.
## Upgrade Steps
### Upgrade Instructions
1. Make sure that your Doris is started in cloud mode. If you are not sure about the current deployment mode of Doris, refer to the instructions in the [previous section](#Doris-Version-Description).
For Doris in local mode, refer to [Cluster Upgrade](../admin-manual/cluster-management/upgrade) for upgrade steps.
2. Make sure that your Doris data import tasks have a retry mechanism to avoid task failures due to node restarts during the upgrade process.
3. Before upgrading, we recommend checking the status of all Doris components (MetaService, Recycler, Frontend and Backend) to ensure they are operating normally and without exception logs to avoid affecting the upgrade process.
### Overview of the Upgrade Process
1. Metadata backup
2. Upgrade MetaService
3. Upgrade Recycler (if have)
4. Upgrade BE
5. Upgrade FE
1. Upgrade Observer FE first
2. Then upgrade other non-Master FE
3. Finally, upgrade Master FE
### Upgrade Pre-work
1. Backup the metadata directory of the Master FE. Usually, the metadata directory is the `doris-meta` directory under the FE home directory. If this directory is empty, it means that you had set another directory to save metadata. You can search for the `meta_dir` in the FE configuration file (conf/fe.conf).
2. [Download](/download) the package from the Doris official website. It is recommended to verify the SHA-512 hash to ensure that the package matches the one provided by Doris.
### Upgrade Process
#### Upgrade MetaService
Assuming the following environment variables:
- `${MS_HOME}`: Working directory of MetaService.
- `${MS_PACKAGE_DIR}`: Directory containing the new MetaService package.
Follow these steps to upgrade each MetaService instance.
1. Stop the current MetaService:
\`\`\`shell
cd ${MS_HOME}
sh bin/stop.sh
\`\`\`
2. Backup the existing MetaService binaries:
\`\`\`shell
mv ${MS_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${MS_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
\`\`\`
3. Deploy the new package:
\`\`\`shell
cp ${MS_PACKAGE_DIR}/bin ${MS_HOME}/bin
cp ${MS_PACKAGE_DIR}/lib ${MS_HOME}/lib
\`\`\`
4. Start the new MetaService:
\`\`\`shell
sh ${MS_HOME}/bin/start.sh --daemon
\`\`\`
5. Check status of the new MetaService:
Verify that the new MetaService is running and that a new version number is present in `${MS_HOME}/log/doris_cloud.out`.
#### Upgrade Recycler (if have)
:::caution
If you have not deployed the Recycler component separately, you can skip this step.
:::
Assuming the following environment variables:
- `${RECYCLER_HOME}`: Working directory of Recycler
- `${MS_PACKAGE_DIR}`: Directory containing the new MetaService package, MetaService and Recycler use same package.
Upgrade each Recycler instance by following these steps.
1. Stop the current Recycler:
\`\`\`shell
cd ${RECYCLER_HOME}
sh bin/stop.sh
\`\`\`
2. Backup existing Recycler binary files:
\`\`\`shell
mv ${RECYCLER_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${RECYCLER_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
\`\`\`
3. Deploy the new package:
\`\`\`shell
cp ${RECYCLER_PACKAGE_DIR}/bin ${RECYCLER_HOME}/bin
cp ${RECYCLER_PACKAGE_DIR}/lib ${RECYCLER_HOME}/lib
\`\`\`
4. Start the new Recycler:
\`\`\`shell
sh ${RECYCLER_HOME}/bin/start.sh --recycler --daemon
\`\`\`
5. Check status of the new Recycler:
Verify that the new MetaService is running and that a new version number is present in `${RECYCLER_HOME}/log/doris_cloud.out`.
#### Upgrade BE
Verify that all instances of MetaService and Recycler (if installed separately) have been upgraded.
Assuming the following environment variables:
- `${BE_HOME}`: Working directory of BE.
- `${BE_PACKAGE_DIR}`: Directory containing the new BE package.
Upgrade each BE instance by following these steps.
1. Stop the current BE:
\`\`\`shell
cd ${BE_HOME}
sh bin/stop_be.sh
\`\`\`
2. Backup the existing BE binaries:
\`\`\`shell
mv ${BE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${BE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
\`\`\`
3. Deploy the new package:
\`\`\`shell
cp ${BE_PACKAGE_DIR}/bin ${BE_HOME}/bin
cp ${BE_PACKAGE_DIR}/lib ${BE_HOME}/lib
\`\`\`
4. Start the new BE:
\`\`\`shell
sh ${BE_HOME}/bin/start_be.sh --daemon
\`\`\`
5. Check status of the new BE:
Confirm that the new BE is running and operational with the new version. The status and version can be obtained using the following SQL.
\`\`\`sql
show backends;
\`\`\`
#### Upgrade FE
Verify that all instances of BE have been upgraded.
Assuming the following environment variables:
- `${FE_HOME}`: Working directory of FE.
- `${FE_PACKAGE_DIR}`: Directory containing the new FE package.
Upgrade the Frontend (FE) instances in the following order:
1. Observer FE nodes
2. Non-master FE nodes
3. Master FE node
Upgrade each Frontend (FE) node by following these steps.
1. Stop the current FE:
\`\`\`shell
cd ${FE_HOME}
sh bin/stop_fe.sh
\`\`\`
2. Backup the existing FE binaries:
\`\`\`shell
mv ${FE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${FE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
\`\`\`
3. Deploy the new package:
\`\`\`shell
cp ${FE_PACKAGE_DIR}/bin ${FE_HOME}/bin
cp ${FE_PACKAGE_DIR}/lib ${FE_HOME}/lib
\`\`\`
4. Start the new FE:
\`\`\`shell
sh ${FE_HOME}/bin/start_fe.sh --daemon
\`\`\`
5. Check status of the new FE:
Confirm that the new FE is running and operational with the new version. The status and version can be obtained using the following SQL.
\`\`\`sql
show frontends;
\`\`\`
## FAQ
1. Does Doris in local mode need to turn off the replica balance function before upgrading, and is it necessary for clusters in cloud mode?
No. Because in cloud mode, the data is stored on HDFS or S3 services, so there is no need for replica balancing.
2. With a separate MetaService providing metadata services, why is it still necessary to backup metadata for FE?
Because currently, MetaService saves some metadata, and FE also saves some metadata. For safety reasons, we recommend backing up the metadata for FE.

Comment on lines +1 to +192
```shell
cp ${RECYCLER_PACKAGE_DIR}/bin ${RECYCLER_HOME}/bin
cp ${RECYCLER_PACKAGE_DIR}/lib ${RECYCLER_HOME}/lib
```

2.4. 启动新的 Recycler:
```shell
sh ${RECYCLER_HOME}/bin/start.sh --recycler --daemon
```

2.5. 检查新 Recycler 的状态:

确保新 Recycler 正在运行,并且在 `${RECYCLER_HOME}/log/doris_cloud.out` 中有新的版本号。

### 步骤 3:升级 BE

验证所有 MetaService 和 Recycler(如果单独安装)实例已升级。

假设以下环境变量:
- `${BE_HOME}`:BE 的工作目录。
- `${BE_PACKAGE_DIR}`:包含新 BE 包的目录。

按照以下步骤升级每个 BE 实例。

3.1. 停止当前 BE:
```shell
cd ${BE_HOME}
sh bin/stop_be.sh
```

3.2. 备份现有 BE 二进制文件:
```shell
mv ${BE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${BE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```

3.3. 部署新包:
```shell
cp ${BE_PACKAGE_DIR}/bin ${BE_HOME}/bin
cp ${BE_PACKAGE_DIR}/lib ${BE_HOME}/lib
```

3.4. 启动新的 BE:
```shell
sh ${BE_HOME}/bin/start_be.sh --daemon
```

3.5. 检查新 BE 的状态:

确认新的 BE 是否正在运行,并且使用新版本正常运行。可以使用以下 SQL 获取状态和版本。

```sql
show backends;
```

### 步骤 4:升级 FE

验证所有 BE 实例已升级。

假设以下环境变量:
- `${FE_HOME}`:FE 的工作目录。
- `${FE_PACKAGE_DIR}`:包含新 FE 包的目录。

按以下顺序升级 Frontend(FE)实例:
1. 观察者 FE 节点
2. 非主 FE 节点
3. 主 FE 节点

按照以下步骤升级每个 Frontend(FE)节点。

4.1. 停止当前 FE:
```shell
cd ${FE_HOME}
sh bin/stop_fe.sh
```

4.2. 备份现有 FE 二进制文件:
```shell
mv ${FE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${FE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```

4.3. 部署新包:
```shell
cp ${FE_PACKAGE_DIR}/bin ${FE_HOME}/bin
cp ${FE_PACKAGE_DIR}/lib ${FE_HOME}/lib
```

4.4. 启动新的 FE:
```shell
sh ${FE_HOME}/bin/start_fe.sh --daemon
```

4.5. 检查新 FE 的状态:

确认新的 FE 是否正在运行,并且使用新版本正常运行。可以使用以下 SQL 获取状态和版本。

```sql
show frontends;
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
---
{
"title": "升级",
"language": "zh-CN"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
本指南提供了使用存储计算解耦架构升级 Doris 的分步说明。升级过程涉及三个主要步骤:升级 MetaService(MS)、可选升级 Recycler,最后升级前端(FE)和后端(BE)组件。
## 先决条件
在开始升级之前,请确保以下事项:
1. **进程检查:** 验证所有 Doris 进程(MetaService、Frontend、Backend)是否正常运行。如果独立部署了 Recycler,请确保 Recycler 进程也正常运行。
## 升级步骤
### 步骤 1:升级 MetaService
假设以下环境变量:
- `${MS_HOME}`:MetaService 的工作目录。
- `${MS_PACKAGE_DIR}`:包含新 MetaService 包的目录。
按照以下步骤升级每个 MetaService 实例。
1.1. 停止当前 MetaService:
```shell
cd ${MS_HOME}
sh bin/stop.sh
```
1.2. 备份现有 MetaService 二进制文件:
```shell
mv ${MS_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${MS_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```
1.3. 部署新包:
```shell
cp ${MS_PACKAGE_DIR}/bin ${MS_HOME}/bin
cp ${MS_PACKAGE_DIR}/lib ${MS_HOME}/lib
```
1.4. 启动新的 MetaService:
```shell
sh ${MS_HOME}/bin/start.sh --daemon
```
1.5. 检查新 MetaService 的状态:
确保新 MetaService 正在运行,并且在 `${MS_HOME}/log/doris_cloud.out` 中有新的版本号。
### 步骤 2:升级 Recycler(可选)
假设以下环境变量:
- `${RECYCLER_HOME}`:Recycler 的工作目录
- `${MS_PACKAGE_DIR}`:包含新 MetaService 包的目录,MetaService 和 Recycler 使用相同的包。
按照以下步骤升级每个 Recycler 实例。
2.1. 停止当前 Recycler:
```shell
cd ${RECYCLER_HOME}
sh bin/stop.sh
```
2.2. 备份现有 Recycler 二进制文件:
```shell
mv ${RECYCLER_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${RECYCLER_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```
2.3. 部署新包:
```shell
cp ${RECYCLER_PACKAGE_DIR}/bin ${RECYCLER_HOME}/bin
cp ${RECYCLER_PACKAGE_DIR}/lib ${RECYCLER_HOME}/lib
```
2.4. 启动新的 Recycler:
```shell
sh ${RECYCLER_HOME}/bin/start.sh --recycler --daemon
```
2.5. 检查新 Recycler 的状态:
确保新 Recycler 正在运行,并且在 `${RECYCLER_HOME}/log/doris_cloud.out` 中有新的版本号。
### 步骤 3:升级 BE
验证所有 MetaService 和 Recycler(如果单独安装)实例已升级。
假设以下环境变量:
- `${BE_HOME}`:BE 的工作目录。
- `${BE_PACKAGE_DIR}`:包含新 BE 包的目录。
按照以下步骤升级每个 BE 实例。
3.1. 停止当前 BE:
```shell
cd ${BE_HOME}
sh bin/stop_be.sh
```
3.2. 备份现有 BE 二进制文件:
```shell
mv ${BE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${BE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```
3.3. 部署新包:
```shell
cp ${BE_PACKAGE_DIR}/bin ${BE_HOME}/bin
cp ${BE_PACKAGE_DIR}/lib ${BE_HOME}/lib
```
3.4. 启动新的 BE:
```shell
sh ${BE_HOME}/bin/start_be.sh --daemon
```
3.5. 检查新 BE 的状态:
确认新的 BE 是否正在运行,并且使用新版本正常运行。可以使用以下 SQL 获取状态和版本。
```sql
show backends;
```
### 步骤 4:升级 FE
验证所有 BE 实例已升级。
假设以下环境变量:
- `${FE_HOME}`:FE 的工作目录。
- `${FE_PACKAGE_DIR}`:包含新 FE 包的目录。
按以下顺序升级 Frontend(FE)实例:
1. 观察者 FE 节点
2. 非主 FE 节点
3. 主 FE 节点
按照以下步骤升级每个 Frontend(FE)节点。
4.1. 停止当前 FE:
```shell
cd ${FE_HOME}
sh bin/stop_fe.sh
```
4.2. 备份现有 FE 二进制文件:
```shell
mv ${FE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${FE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
```
4.3. 部署新包:
```shell
cp ${FE_PACKAGE_DIR}/bin ${FE_HOME}/bin
cp ${FE_PACKAGE_DIR}/lib ${FE_HOME}/lib
```
4.4. 启动新的 FE:
```shell
sh ${FE_HOME}/bin/start_fe.sh --daemon
```
4.5. 检查新 FE 的状态:
确认新的 FE 是否正在运行,并且使用新版本正常运行。可以使用以下 SQL 获取状态和版本。
```sql
show frontends;
```
---
{
"title": "升级",
"language": "zh-CN"
}
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## 概述
本指南提供了使用存储计算解耦(即,存算分离)架构升级 Doris 的分步说明。升级请使用本章节中推荐的步骤进行集群升级,Doris 集群升级可使用**滚动升级**的方式进行升级,无需集群节点全部停机升级,极大程度上降低对上层应用的影响。
## Doris 版本说明
Doris 使用三位数的版本号格式,可以使用如下 SQL 进行查看版本:
\`\`\`sql
MySQL [(none)]> select @@version_comment;
+--------------------------------------------------------+
| @@version_comment |
+--------------------------------------------------------+
| Doris version doris-3.0.3-rc03-43f06a5e26 (Cloud Mode) |
+--------------------------------------------------------+
\`\`\`
> 其中`3.0.3`的第一个数字表示大版本号,第二个数字表示中版本号,第三个数字表示小版本号,在某些情况下,版本号会变成 4 位,如`2.0.2.1`,此时的最后一位数字表示这是一个紧急修复 bug 的版本,这通常意味着这个小版本有一些重大的 bug。
>
> Doris 从`3.0.0`版本开始支持存算分离模式部署,当以这种模式部署后,版本号后面会有 Cloud Mode 后缀,以存算一体模式启动的话,则没有这个后缀。
Doris 以存算分离模式部署之后,不支持切换成存算一体模式。同样的,存算一体模式的 Doris 也不支持切换成存算分离模式。
Doris 原则上支持从低版本升级到高版本,以及小版本降级,对于中版本或大版本,则不支持降级。
## 升级步骤
### 升级说明
1. 确保你的 Doris 是以存算分离模式启动的,如果你不清楚当前的 Doris 是什么部署方式,可以参考[上一小节](#doris-版本说明)的说明。
对于存算一体模式的 Doris,升级步骤可参考[集群升级](../admin-manual/cluster-management/upgrade)
2. 确保你的 Doris 导数任务具备重试机制,以避免升级过程中,因节点重启而导致的导数任务失败。
3. 在升级之前,我们建议你检查一下各个 Doris 组件(MetaService、Recycler、Frontend、Backend)的状态正常并且无异常日志,以免升级过程中受到影响。
### 升级流程概览
1. 元数据备份
2. 升级 MetaService
3. 升级 Recycler(如有)
4. 升级 BE
5. 升级 FE
1. 先升级 Observer 角色的 FE
2. 再升级其他非 Master 角色的 FE
3. 最后升级 Master 角色的 FE
### 升级前置工作
1. 备份 Master FE 的元数据目录,元数据目录通常是 FE 目录下 doris-meta 目录,如果此目录为空,那么可能是修改了目录的位置,你可以到 FE 的配置文件(conf/fe.conf)中搜索`meta_dir`配置项。
2. 从 Doris 官方网站[下载](/download)安装包,建议校验 SHA-512 码,保证下载到到安装包与 Doris 官方提供的是一致的。
### 升级流程
#### 升级 MetaService
假设以下环境变量:
- `${MS_HOME}`:MetaService 的工作目录。
- `${MS_PACKAGE_DIR}`:包含新 MetaService 包的目录。
按照以下步骤升级每个 MetaService 实例。
1. 停止当前 MetaService:
\`\`\`shell
cd ${MS_HOME}
sh bin/stop.sh
\`\`\`
2. 备份现有 MetaService 二进制文件:
\`\`\`shell
mv ${MS_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${MS_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
\`\`\`
3. 部署新包:
\`\`\`shell
cp ${MS_PACKAGE_DIR}/bin ${MS_HOME}/bin
cp ${MS_PACKAGE_DIR}/lib ${MS_HOME}/lib
\`\`\`
4. 启动新的 MetaService:
\`\`\`shell
sh ${MS_HOME}/bin/start.sh --daemon
\`\`\`
5. 检查新 MetaService 的状态:
确保新 MetaService 正在运行,并且在 `${MS_HOME}/log/doris_cloud.out` 中有新的版本号。
#### 升级 Recycler(如有)
:::caution
如果你没有单独部署 Recycler 组件,那么可以跳过这一步。
:::
假设以下环境变量:
- `${RECYCLER_HOME}`:Recycler 的工作目录
- `${MS_PACKAGE_DIR}`:包含新 MetaService 包的目录,MetaService 和 Recycler 使用相同的包。
按照以下步骤升级每个 Recycler 实例。
1. 停止当前 Recycler:
\`\`\`shell
cd ${RECYCLER_HOME}
sh bin/stop.sh
\`\`\`
2. 备份现有 Recycler 二进制文件:
\`\`\`shell
mv ${RECYCLER_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${RECYCLER_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
\`\`\`
3. 部署新包:
\`\`\`shell
cp ${RECYCLER_PACKAGE_DIR}/bin ${RECYCLER_HOME}/bin
cp ${RECYCLER_PACKAGE_DIR}/lib ${RECYCLER_HOME}/lib
\`\`\`
4. 启动新的 Recycler:
\`\`\`shell
sh ${RECYCLER_HOME}/bin/start.sh --recycler --daemon
\`\`\`
5. 检查新 Recycler 的状态:
确保新 Recycler 正在运行,并且在 `${RECYCLER_HOME}/log/doris_cloud.out` 中有新的版本号。
#### 升级 BE
验证所有 MetaService 和 Recycler(如果单独安装)实例已升级。
假设以下环境变量:
- `${BE_HOME}`:BE 的工作目录。
- `${BE_PACKAGE_DIR}`:包含新 BE 包的目录。
按照以下步骤升级每个 BE 实例。
1. 停止当前 BE:
\`\`\`shell
cd ${BE_HOME}
sh bin/stop_be.sh
\`\`\`
2. 备份现有 BE 二进制文件:
\`\`\`shell
mv ${BE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${BE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
\`\`\`
3. 部署新包:
\`\`\`shell
cp ${BE_PACKAGE_DIR}/bin ${BE_HOME}/bin
cp ${BE_PACKAGE_DIR}/lib ${BE_HOME}/lib
\`\`\`
4. 启动新的 BE:
\`\`\`shell
sh ${BE_HOME}/bin/start_be.sh --daemon
\`\`\`
5. 检查新 BE 的状态:
确认新的 BE 是否正在运行,并且使用新版本正常运行。可以使用以下 SQL 获取状态和版本。
\`\`\`sql
show backends;
\`\`\`
#### 升级 FE
验证所有 BE 实例已升级。
假设以下环境变量:
- `${FE_HOME}`:FE 的工作目录。
- `${FE_PACKAGE_DIR}`:包含新 FE 包的目录。
按以下顺序升级 Frontend(FE)实例:
1. 观察者 FE 节点
2. 非主 FE 节点
3. 主 FE 节点
按照以下步骤升级每个 Frontend(FE)节点。
1. 停止当前 FE:
\`\`\`shell
cd ${FE_HOME}
sh bin/stop_fe.sh
\`\`\`
2. 备份现有 FE 二进制文件:
\`\`\`shell
mv ${FE_HOME}/bin bin_backup_$(date +%Y%m%d_%H%M%S)
mv ${FE_HOME}/lib lib_backup_$(date +%Y%m%d_%H%M%S)
\`\`\`
3. 部署新包:
\`\`\`shell
cp ${FE_PACKAGE_DIR}/bin ${FE_HOME}/bin
cp ${FE_PACKAGE_DIR}/lib ${FE_HOME}/lib
\`\`\`
4. 启动新的 FE:
\`\`\`shell
sh ${FE_HOME}/bin/start_fe.sh --daemon
\`\`\`
5. 检查新 FE 的状态:
确认新的 FE 是否正在运行,并且使用新版本正常运行。可以使用以下 SQL 获取状态和版本。
\`\`\`sql
show frontends;
\`\`\`
## FAQ
1. 存算一体模式的 Doris 的升级前需要关闭副本均衡功能,存算分离模式下的集群需要吗?
不需要。因为存算分离模式下,Doris 的数据存放在 HDFS 或 S3 服务上,因此不存在副本均衡的需求。
2. 有了独立的 MetaService 提供元数据服务,为什么 FE 还需要备份元数据?
因为目前 MetaService 保存了一部分数据,FE 也保存了一部分数据,为了稳妥起见,我们建议备份 FE 的元数据。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants