From 1e09793e3d9ea09d9cfb88aec6483fe344067414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=99=93=E9=9D=92?= <86282370+izhuxiaoqing@users.noreply.github.com> Date: Thu, 2 Sep 2021 11:23:14 +0800 Subject: [PATCH] upgrade nebula graph to 250 --- .../upgrade-nebula-from-200-to-250.md | 29 +- .../upgrade-nebula-graph-to-250.md | 377 +++++++++--------- 2 files changed, 196 insertions(+), 210 deletions(-) diff --git a/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-from-200-to-250.md b/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-from-200-to-250.md index 0d67fc9d4aa..92ceda80165 100644 --- a/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-from-200-to-250.md +++ b/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-from-200-to-250.md @@ -1,16 +1,16 @@ # Upgrade Nebula Graph v2.0.x to v{{nebula.release}} -To upgrade Nebula Graph v2.0.x to v{{nebula.release}}, you only need to use the RPM/DEB package of v{{nebula.release}} for the upgrade operation, or [compile v{{nebula.release} }](../2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md) and then reinstall. +To upgrade Nebula Graph v2.0.x to v{{nebula.release}}, you only need to use the RPM/DEB package of v{{nebula.release}} for the upgrade, or [Compile v{{nebula.release} }](../2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md) and then reinstall. !!! note - Nebula Graph v2.0.x refers to v2.0.0-GA and v2.0.1 versions. If the Nebula Graph version is too low (v2.0.0-RC, v2.0.0-beta, v1.x), please refer to [Upgrade Nebula Graph Historical Version to v{{nebula.release}}](upgrade-nebula-graph-to -250.md). + Nebula Graph v2.0.x refers to v2.0.0-GA and v2.0.1 releases. If your Nebula Graph version is too low (v2.0.0-RC, v2.0.0-beta, v1.x),see [Upgrade Nebula Graph to v{{nebula.release}}](upgrade-nebula-graph-to-250.md). -## RPM/DEB package upgrade steps +## Upgrade steps with RPM/DEB packages -1. Download [RPM/DEB package](https://github.com/vesoft-inc/nebula-graph/releases/tag/v{{nebula.release}}). +1. Download the [RPM/DEB package](https://github.com/vesoft-inc/nebula-graph/releases/tag/v{{nebula.release}}). -2. Stop all Nebula Graph services. For details, please refer to [Manage Nebula Graph Service](../../2.quick-start/5.start-stop-service.md). It is recommended to back up the configuration file before updating. +2. Stop all Nebula Graph services. For details, see [Manage Nebula Graph Service](../../2.quick-start/5.start-stop-service.md). It is recommended to back up the configuration file before updating. 3. Execute the following command to upgrade: @@ -19,30 +19,31 @@ To upgrade Nebula Graph v2.0.x to v{{nebula.release}}, you only need to use the ```bash $ sudo rpm -Uvh ``` - - If you specify the path during installation, you also need to specify the path during upgrade - + + If you specify the path during installation, you also need to specify the path during upgrade. + ```bash $ sudo rpm -Uvh --prefix= ``` + -DEB package ```bash $ sudo dpkg -i ``` -4. Start the required services on each server. For details, please refer to [Manage Nebula Graph Service](../../2.quick-start/5.start-stop-service.md#_1). +4. Start the required services on each server. For details, see [Manage Nebula Graph Service](../../2.quick-start/5.start-stop-service.md#_1). -## Compile the new version source code upgrade steps +## Upgrade steps by compiling the new source code 1. Back up the old version of the configuration file. The configuration file is saved in the `etc` directory of the Nebula Graph installation path. -2. Update the warehouse and compile the source code. For details, please refer to [Install Nebula Graph Using Source Code](../2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md). +2. Update the repository and compile the source code. For details, see [Install Nebula Graph by compiling the source code](../2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md). !!! note - When compiling, pay attention to setting the installation path, which is consistent with the installation path of the old version. + When compiling, set the installation path, which is the same as the installation path of the old version. -## Docker Compose deployment upgrade steps +## Upgrade steps by deploying Docker Compose -Please refer to [How to update the Docker image of Nebula Graph service](../2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md#nebula_graphdocker). \ No newline at end of file +See [How to update the Docker image of Nebula Graph services](../2.compile-and-install-nebula-graph/3.deploy-nebula-graph-with-docker-compose.md#nebula_graphdocker). diff --git a/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-250.md b/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-250.md index fda3d8ff8a1..809d769c9e0 100644 --- a/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-250.md +++ b/docs-2.0/4.deployment-and-installation/3.upgrade-nebula-graph/upgrade-nebula-graph-to-250.md @@ -1,6 +1,10 @@ -# Upgrade Nebula Graph to v2.0.0 +# Upgrade Nebula Graph to v{{nebula.release}} -This topic describes how to upgrade Nebula Graph to v2.0.0. +The legacy versions of Nebula Graph refer to the versions lower than Nebula Graph v2.0.0-GA. This topic describes how to upgrade Nebula Graph to v{{nebula.release}}. + +!!! note + + To upgrade Nebula Graph v2.0.0-GA or later versions to v{{nebula.release}}, see [Nebula Graph v2.0.x to v{{nebula.release}}](upgrade-nebula-from-200-to-250.md). ## Limitations @@ -8,15 +12,11 @@ This topic describes how to upgrade Nebula Graph to v2.0.0. * There is no upgrade script. You have to manually upgrade each server in the cluster. -* Supported versions: - * From Nebula Graph [v1.2.0](https://github.com/vesoft-inc/nebula/releases/tag/v1.2.0) to [Nebula Graph v2.0.0](https://github.com/vesoft-inc/nebula-graph/releases/tag/v2.0.0). - * From Nebula Graph [v2.0.0-RC1](https://github.com/vesoft-inc/nebula-graph/releases/tag/v2.0.0-rc1) to Nebula Graph 2.0.0. - -* This topic does not apply to scenarios where Nebula Graph is deployed with Docker, including Docker Swarm, Docker Compose, and Kubernetes. +* This topic does not apply to scenarios where Nebula Graph is deployed with Docker, including Docker Swarm, Docker Compose, and K8s. * You must upgrade the old Nebula Graph services on the same machines they are deployed. **DO NOT** change the IP addresses, configuration files of the machines, and **DO NOT** change the cluster topology. -* The hard disk space of each machine should be three times as much as the space taken by the original data directories. +* The hard disk space of each machine should be **three times** as much as the space taken by the original data directories. * Known issues that could cause data loss are listed on [GitHub known issues](https://github.com/vesoft-inc/nebula-graph/issues/857). The issues are all related to altering schema or default values. @@ -34,11 +34,9 @@ This topic describes how to upgrade Nebula Graph to v2.0.0. By default, old versions of Nebula Graph are installed in `/usr/local/nebula/`, hereinafter referred to as `${nebula-old}`. The default configuration file path is `${nebula-old}/etc/`. -The data of the old Nebula Graph are stored by the Storage Service and the Meta Service. You can find the data paths as follows. - -* Storage data path is defined by the `--data_path` option in the `${nebula-old}/etc/nebula-storaged.conf` file. The default path is `data/storage`. +* Storaged data path is defined by the `--data_path` option in the `${nebula-old}/etc/nebula-storaged.conf` file. The default path is `data/storage`. -* Meta data path is defined by the `--data_path` option in the `${nebula-old}/etc/nebula-metad.conf` file. The default path is `data/meta`. +* Metad data path is defined by the `--data_path` option in the `${nebula-old}/etc/nebula-metad.conf` file. The default path is `data/meta`. !!! note @@ -46,280 +44,271 @@ The data of the old Nebula Graph are stored by the Storage Service and the Meta ### New installation path -`${nebula-new}` represents the installation path of the new Nebula Graph version. An example for `${nebula-new}` is `/usr/local/nebula-new/`. +`${nebula-new}` represents the installation path of the new Nebula Graph version, such as `/usr/local/nebula-new/`. + +``` +# mkdir -p ${nebula-new} +``` -## Steps +## Upgrade steps -1. Stop all client connections. You can run the following commands on each Graph server to turn off the Graph Service and avoid dirty write. +1. **Stop all client connections**. You can run the following commands on each Graph server to turn off the Graph Service and avoid dirty write. - ```bash - > ${nebula-old}/scripts/nebula.service stop graphd - [INFO] Stopping nebula-graphd... - [INFO] Done - ``` + ``` + # ${nebula-old}/scripts/nebula.service stop graphd + [INFO] Stopping nebula-graphd... + [INFO] Done + ``` 2. Run the following commands to stop all services of the old version Nebula Graph. - ```bash - > ${nebula-old}/scripts/nebula.service stop all - [INFO] Stopping nebula-metad... - [INFO] Done - [INFO] Stopping nebula-graphd... - [INFO] Done - [INFO] Stopping nebula-storaged... - [INFO] Done - ``` + ``` + # ${nebula-old}/scripts/nebula.service stop all + [INFO] Stopping nebula-metad... + [INFO] Done + [INFO] Stopping nebula-graphd... + [INFO] Done + [INFO] Stopping nebula-storaged... + [INFO] Done + ``` - The Storage Service needs about 1 minute to flush data. Wait 1 minute and then run `ps -ef | grep nebula` to check and make sure that all the Nebula Graph services are stopped. + The `storaged` process needs about 1 minute to flush data. Wait 1 minute and then run `ps -ef | grep nebula` to check and make sure that all the Nebula Graph services are stopped. - !!! note + !!! Note - If the services are not fully stopped in 20 minutes, stop upgrading and go to the [Nebula Graph community](https://discuss.nebula-graph.io/) for help. + If the services are not fully stopped in 20 minutes, **stop upgrading** and go to the [Nebula Graph community](https://discuss.nebula-graph.io/) for help. 3. Install the new version of Nebula Graph on each machine. - * To install with RPM/DEB packages, run the following command. For detailed steps, see [Install Nebula Graph with RPM or DEB package](2.compile-and-install-nebula-graph/2.install-nebula-graph-by-rpm-or-deb.md). - - ```bash - > sudo rpm --force -i --prefix=${nebula-new} ${nebula-package-name.rpm} # for CentOS/RedHat - > sudo dpkg -i --instdir==${nebula-new} ${nebula-package-name.deb} # for Ubuntu - ``` - - * To install with the source code, follow the substeps. For detailed steps, see [Install Nebula Graph by compiling the source code](2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md) + 1. Install the new binary file. - 1. Clone the source code. + - To install with RPM/DEB packages, download the installation package of the corresponding operating system from [release page](https://github.com/vesoft-inc/nebula-graph/releases). - ```bash - > git clone --branch v2.0.0 https://github.com/vesoft-inc/nebula-graph.git - ``` + ``` + # sudo rpm --force -i --prefix=${nebula-new} ${nebula-package-name.rpm} # for centos/redhat + # sudo dpkg -i --instdir==${nebula-new} ${nebula-package-name.deb} # for ubuntu + ``` - 2. Configure CMake. + For detailed steps, see [Install Nebula Graph with RPM or DEB package](2.compile-and-install-nebula-graph/2.install-nebula-graph-by-rpm-or-deb.md). - ```bash - > cmake -DCMAKE_INSTALL_PREFIX=${nebula-new} -DENABLE_BUILD_STORAGE=on -DENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DNEBULA_COMMON_REPO_TAG=v2.0.0 -DNEBULA_STORAGE_REPO_TAG=v2.0.0 .. - ``` + - To install with the source code, follow the substeps. For detailed steps, see [Install Nebula Graph by compiling the source code](2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md). Some key commands are as follows. -4. Copy the configuration files from the old path to the new path. + - Clone the source code. + + ``` + # git clone --branch v{{nebula.release}} https://github.com/vesoft-inc/nebula-graph.git + ``` - ```bash - > cp -rf ${nebula-old}/etc ${nebula-new}/ - ``` + - Configure CMake. -5. Follow the substeps to prepare the Meta servers (usually 3 of them in a cluster). + ``` + # cmake -DCMAKE_INSTALL_PREFIX=${nebula-new} -DENABLE_BUILD_STORAGE=on -DENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DNEBULA_COMMON_REPO_TAG=v{{nebula.release}} -DNEBULA_STORAGE_REPO_TAG=v{{nebula.release}} .. + ``` - !!! note + 2. Copy the configuration files from the old path to the new path. - You must make sure that this step is applied on every Meta server. + ``` + # cp -rf ${nebula-old}/etc ${nebula-new}/ + ``` - 1. Locate the old Meta [data path](#old-installation-path) and copy the data files to the new path. +4. Follow the substeps to prepare the Meta servers (usually 3 of them in a cluster). - ```bash - > mkdir -p ${nebula-new}/data/meta/ - > cp -r ${nebula-old}/data/meta/* ${nebula-new}/data/meta/ - ``` + - Locate the old Meta [data path](#old-installation-path) and copy the data files to the new path. - 2. Modify the new Meta configuration files: + Find the `--data_path` option in `${nebula-old}/etc/nebula-metad.conf`. The default value is `data/meta`. - ```bash - > vim ${nebula-new}/nebula-metad.conf - ``` + - If the legacy versions **has not changed** the `--data_path` item, run the following command to copy the meta data to the new directory. - [Optional] Add the following parameters in the Meta configuration files if you need them. + ``` + # mkdir -p ${nebula-new}/data/meta/ + # cp -r ${nebula-old}/data/meta/* ${nebula-new}/data/meta/ + ``` - * `--null_type=false`: Disables the support for using [`NULL`](../3.ngql-guide/3.data-types/5.null.md) as schema properties after the upgrade. The default value is `true`. When set to `false`, you must specify a [default value](../3.ngql-guide/10.tag-statements/1.create-tag.md) when altering tags or edge types, otherwise, data reading fails. - * `--string_index_limit=32`: Specifies the index length for string values as 32. The default length is 64. + - If the legacy versions change the default metad directory, copy it according to the actual directory. -6. Prepare the Storage configuration files on each Storage server. + - Modify the new Meta configuration files. - * If the old Storage data path is not the default setting `--data_path=data/storage`, Modify the Storage configuration file and change the value of `--data_path` as the new data path. + - Edit the new metad configuration file. - ```bash - > vim ${nebula-new}/nebula-storaged.conf - ``` + ``` + # vim ${nebula-new}/nebula-metad.conf + ``` - * Create the new Storage data directories. + - [Optional]Add the following parameters in the Meta configuration files if you need them. - ```bash - > mkdir -p ${nebula-new}/data/storage/ - ``` + `--null_type=false`: Disables the support for using [`NULL`](../../3.ngql-guide/3.data-types/5.null.md).**The default value is `true`**. When set to `false`, you must specify a [default value](../3.ngql-guide/10.tag-statements/1.create-tag.md) when altering tags or edge types, otherwise, data reading fails. - !!! note + `--string_index_limit=32`: Specifies the [index length](../../3.ngql-guide/14.native-index-statements/1.create-native-index.md) for string values as 32. The default length is 64. - If the `--data_path` default value has been modified, create the Storage data directories according to the modification. + !!! Note -7. Start the new Meta Service. + You must make sure that this step is applied on every Meta server. - 1. Run the following command on each Meta server. +5. Prepare the Storage configuration files on each Storage server. - ```bash - $ sudo ${nebula-new}/scripts/nebula.service start metad - [INFO] Starting nebula-metad... - [INFO] Done - ``` + + [Optional]If the old Storage data path is not the default setting `--data_path=data/storage`, modify it. - 2. Check if every nebula-metad process is started normally. + ``` + # vim ${nebula-new}/nebula-storaged.conf + ``` + Change the value of `--data_path` as the new data path. - ```bash - $ ps -ef |grep nebula-metad - ``` + + Create the new Storage data directories. - 3. Check if there is any error information in the Meta logs in `${nebula-new}/logs`. If any nebula-metad process cannot start normally, stop upgrading, start the Nebula Graph services from the old directories, and take the error logs to the [Nebula Graph community](https://discuss.nebula-graph.io/) for help. + ``` + # mkdir -p ${nebula-new}/data/storage/ + ``` -8. Run the following commands to upgrade the Storage data format. + If the `--data_path` default value has been modified, create the Storage data directories according to the modification. - ```bash - $ sudo ${nebula-new}/bin/db_upgrader \ - --src_db_path= \ - --dst_db_path= \ - --upgrade_meta_server=:[,:,...] \ - --upgrade_version= \ - ``` +6. Start the new Meta Service. - The parameters are described as follows. + - Run the following command on each Meta server. - * `--src_db_path`: Specifies the absolute path of the **OLD** Storage data directories. Separate multiple paths with commas, without spaces. + ``` + # ${nebula-new}/scripts/nebula.service start metad + [INFO] Starting nebula-metad... + [INFO] Done + ``` - * `--dst_db_path`: Specifies the absolute path of the **NEW** Storage data directories. Separate multiple paths with commas, without spaces. The paths must correspond to the paths set in `--src_db_path` one by one. + - Check if every nebula-metad process is started normally. - !!! danger + ``` + # ps -ef |grep nebula-metad + ``` - Don't mix up the preceding two parameters, otherwise, the old data will be damaged during the upgrade. + - Check if there is any error information in the Meta logs in `${nebula-new}/logs`. + + !!! Note - * `--upgrade_meta_server`: Specifies the addresses of the new Meta servers that you started in step 7. + If any nebula-metad process cannot start normally, **stop upgrading, start the Nebula Graph services from the old directories**, and take the error logs to the [Nebula Graph community](https://discuss.nebula-graph.io/) for help. - * `--upgrade_version`: If the old Nebula Graph version is v1.2.0, set the parameter value to `1`. If the old version is v2.0.0-RC1, set the value to 2. +7. Run the following commands to upgrade the Storage data format. - !!! danger + ``` + # ${nebula-new}/bin/db_upgrader \ + --src_db_path= \ + --dst_db_path= \ + --upgrade_meta_server=:[,:,...] \ + --upgrade_version= \ + ``` - Don't set the value to other numbers. + The parameters are described as follows. - Example of upgrading from v1.2.0: + - `--src_db_path`: Specifies the absolute path of the **OLD** Storage data directories. Separate multiple paths with commas, without spaces. - ```bash - $ sudo /usr/local/nebula_new/bin/db_upgrader \ - --src_db_path=/usr/local/nebula/data/storage/data1/,/usr/local/nebula/data/storage/data2/ \ - --dst_db_path=/usr/local/nebula_new/data/storage/data1/,/usr/local/nebula_new/data/storage/data2/\ - --upgrade_meta_server=192.168.8.14:45500,192.168.8.15:45500,192.168.8.16:45500 \ - --upgrade_version=1 - ``` + - `--dst_db_path`: Specifies the absolute path of the **NEW** Storage data directories. Separate multiple paths with commas, without spaces. The paths must correspond to the paths set in `--src_db_path` one by one. - Example of upgrading from v2.0.0-RC1: + - `--upgrade_meta_server`: Specifies the addresses of the new Meta servers that you started in step 6. - ```bash - $ sudo /usr/local/nebula_new/bin/db_upgrader \ - --src_db_path=/usr/local/nebula/data/storage/ \ - --dst_db_path=/usr/local/nebula_new/data/storage/ \ - --upgrade_meta_server=192.168.8.14:9559,192.168.8.15:9559,192.168.8.16:9559 \ - --upgrade_version=2 - ``` + - `--upgrade_version`: If the old Nebula Graph version is v1.2.0, set the parameter value to `1`. If the old version is v2.0.0-RC1, set the value to `2`. Do not set the value to other numbers. - !!! note + !!! danger - Make sure that all the Storage servers have finished the upgrade. If anything goes wrong: + Do not mix up the order of `--src_db_path` and `--dst_db_path`. Otherwise, the old data will be damaged during the upgrade. - 1. Stop upgrading. - 2. Stop all the Meta servers. - 3. Start the Nebula Graph services from the old directories. - 4. Go to the [Nebula Graph community](https://discuss.nebula-graph.io/) for help. + For example, upgrade from v1.2.x: -9. Start the new Storage Service on each Storage server. + ``` + # /usr/local/nebula_new/bin/db_upgrader \ + --src_db_path=/usr/local/nebula/data/storage/data1/,/usr/local/nebula/data/storage/data2/ \ + --dst_db_path=/usr/local/nebula_new/data/storage/data1/,/usr/local/nebula_new/data/storage/data2/\ + --upgrade_meta_server=192.168.*.14:45500,192.168.*.15:45500,192.168.*.16:45500 \ + --upgrade_version=1 + ``` - ```bash - $ sudo ${nebula-new}/scripts/nebula.service start storaged - $ sudo ${nebula-new}/scripts/nebula.service status storaged - ``` + For example, upgrade from v2.0.0-RC1: - !!! note - If this step goes wrong on any server: + ``` + # /usr/local/nebula_new/bin/db_upgrader \ + --src_db_path=/usr/local/nebula/data/storage/ \ + --dst_db_path=/usr/local/nebula_new/data/storage/ \ + --upgrade_meta_server=192.168.*.14:9559,192.168.*.15:9559,192.168.*.16:9559 \ + --upgrade_version=2 + ``` - 1. Stop upgrading. - 2. Stop all the Meta servers and Storage servers. - 3. Start the Nebula Graph services from the old directories. - 4. Take the logs in `${nebula-new}/logs/` to the [Nebula Graph community](https://discuss.nebula-graph.io/) for help. + !!! Note + + - If anything goes wrong, **Stop upgrading, stop all the Meta servers, and start the Nebula Graph services from the old directories.** + - Make sure that all the Storage servers have finished the upgrade. -10. Start the new Graph Service on each Graph server. +8. Start the new Storage Service on each Storage server. - ```bash - $ sudo ${nebula-new}/scripts/nebula.service start graphd - $ sudo ${nebula-new}/scripts/nebula.service status graphd - ``` + ``` + # ${nebula-new}/scripts/nebula.service start storaged + # ${nebula-new}/scripts/nebula.service status storaged + ``` !!! note + If this step goes wrong on any server, Take the logs in `${nebula-new}/logs/` to the [Nebula Graph community](https://discuss.nebula-graph.io/) for help. **Stop upgrading. Stop all the Meta servers and Storage servers. Start the Nebula Graph services from the old directories.** - If this step goes wrong on any server: +9. Start the new Graph Service on each Graph server. - 1. Stop upgrading. - 2. Stop all the Meta servers, Storage servers, and Graph servers. - 3. Start the Nebula Graph services from the old directories. - 4. Take the logs in `${nebula-new}/logs/` to the [Nebula Graph community](https://discuss.nebula-graph.io/) for help. + ``` + # ${nebula-new}/scripts/nebula.service start graphd + # ${nebula-new}/scripts/nebula.service status graphd + ``` -11. Connect to Nebula Graph with the new version (v2.0.0 or later) of [Nebula Console](https://github.com/vesoft-inc/nebula-console). Verify if the Nebula Graph services are available and if the data can be accessed normally. - - The command for connection, including the IP address and port of the Graph Service, is the same as the old one. - - The following statements may help in this step. + !!! note - ```ngql - nebula> SHOW HOSTS; - nebula> SHOW SPACES; - nebula> USE - nebula> SHOW PARTS; - nebula> SUBMIT JOB STATS; - nebula> SHOW STATS; - ``` + If this step goes wrong on any server, take the logs in `${nebula-new}/logs/` to the [Nebula Graph community](https://discuss.nebula-graph.io/) for help. **Stop upgrading. Stop all the Meta servers, Storage servers, and Graph servers. Start the Nebula Graph services from the old directories.** - !!! danger +10. Connect to Nebula Graph with the new versions of [Nebula Console](https://github.com/vesoft-inc/nebula-console). Verify if the Nebula Graph services are available and if the data can be accessed normally. Make sure that the command parameters, including the IP address and port of the Graph Service, are the same as the old one. - Don't use Nebula Console versions prior to v2.0.0. + ```ngql + nebula> SHOW HOSTS; + nebula> SHOW SPACES; + nebula> USE + nebula> SHOW PARTS; + nebula> SUBMIT JOB STATS; + nebula> SHOW STATS; + ``` -12. Upgrade other Nebula Graph clients. + !!! Note - You must upgrade all other clients to corresponding v2.0.0 versions. The clients include but are not limited to the following ones. Find the v2.0.0 branch for each client. + The old releases of Nebula Console may have compatibility issues. - * [studio](https://github.com/vesoft-inc/nebula-docker-compose) - * [python](https://github.com/vesoft-inc/nebula-python) - * [java](https://github.com/vesoft-inc/nebula-java) - * [go](https://github.com/vesoft-inc/nebula-go) - * [c++](https://github.com/vesoft-inc/nebula-cpp) - * [flink-connector](https://github.com/vesoft-inc/nebula-flink-connector) - * [spark-util](https://github.com/vesoft-inc/nebula-spark-utils) - * [benchmark](https://github.com/vesoft-inc/nebula-bench) +11. Upgrade other Nebula Graph clients. - !!! note + You must upgrade all other clients to corresponding Nebula Graph v{{nebula.release}}. The clients include but are not limited to [Python](https://github.com/vesoft-inc/nebula-python), [Java](https://github.com/vesoft-inc/nebula-java), [go](https://github.com/vesoft-inc/nebula-go), [C++](https://github.com/vesoft-inc/nebula-cpp), [Flink-connector](https://github.com/vesoft-inc/nebula-flink-connector), [Spark-util](https://github.com/vesoft-inc/nebula-spark-utils), and [Nebula Bench](https://github.com/vesoft-inc/nebula-bench). Find the v{{nebula.release}} branch for each client. - + Communication protocols of the v2.0.0 versions are not compatible with that of the historical versions. To upgrade the clients, you must compile the v2.0.0 source code of the clients or download corresponding binaries. + !!! Note - + Tip for maintenance: The data path after the upgrade is `${nebula-new}/`. Modify relative paths for hard disk monitor systems or log ELK. + Communication protocols of v{{nebula.release}} are not compatible with that of the old releases. To upgrade the clients, compile the v{{nebula.release}} source code of the clients or download corresponding binaries. + + Tip for maintenance: The data path after the upgrade is `${nebula-new}/`. Modify relative paths for hard disk monitor systems, log, or ELK, etc. ## Upgrade failure and rollback If the upgrade fails, stop all Nebula Graph services of the new version, and start the services of the old version. -All Nebula Graph clients in use must be switched to the old version. +All Nebula Graph clients in use must be switched to the **old version**. ## Appendix 1: Test Environment The test environment for this topic is as follows: * Machine specifications: 32 CPU cores, 62 GB memory, and SSD. + * Data size: 100 GB of Nebula Graph 1.2.0 LDBC test data, with 1 graph space, 24 partitions, and 92 GB of data directory size. -* Concurrent configuration: - |Parameter|Default value|Applied value in the Tests| - |-|-|-| - |--max_concurrent|5|5| - |--max_concurrent_parts|10|24| - |--write_batch_num|100|100| +* Concurrent configuration: `--max_concurrent=5`, `--max_concurrent_parts=24`, and `--write_batch_num=100`. + +The upgrade cost **21 minutes** in all, including 13 minutes of compaction. The descriptions are as follows. -The upgrade cost 21 minutes in all, including 21 minutes of compaction. +|Parameter|Default value| +|:---|:---| +|`--max_concurrent`|5| +|`--max_concurrent_parts`|10| +|`--write_batch_num`|100| ## Appendix 2: Nebula Graph V2.0.0 code address and commit ID | Code address | Commit ID | |:---|:---| -| [Graph Service](https://github.com/vesoft-inc/nebula-graph/releases/tag/v2.0.0) | 7923a45 | -| [Storage and Meta Services](https://github.com/vesoft-inc/nebula-storage/tree/v2.0.0) | 761f22b | -| [Common](https://github.com/vesoft-inc/nebula-common/tree/v2.0.0) | b2512aa | +| [graphd](https://github.com/vesoft-inc/nebula-graph/releases/tag/v2.0.0) | 91639db | +| [storaged and metad](https://github.com/vesoft-inc/nebula-storage/tree/v2.0.0) | 761f22b | +| [common](https://github.com/vesoft-inc/nebula-common/tree/v2.0.0) | b2512aa | ## FAQ @@ -327,13 +316,9 @@ The upgrade cost 21 minutes in all, including 21 minutes of compaction. A: No. The state of the data written during this process is undefined. -### Can I upgrade other old versions except for v1.2.0 or v2.0.0-RC1 to v2.0.0? - -A: Upgrading from other old versions is not tested. Theoretically, versions between v1.0.0 and v1.2.0 could adopt the upgrade approach for v1.2.0. V2.x nightly versions cannot apply the solutions in this topic. - -### How to upgrade clients after the server upgrade? +### Can I upgrade other old versions except for v1.2.x and v2.0.0-RC to v{{nebula.release}}? -A: See step 12 in this topic. +A: Upgrading from other old versions is not tested. Theoretically, versions between v1.0.0 and v1.2.0 could adopt the upgrade approach for v1.2.x. v2.0.0-RC nightly versions cannot apply the solutions in this topic. ### How to upgrade if a machine has only the Graph Service, but not the Storage Service? @@ -345,7 +330,7 @@ A: Try again with the sudo privileges. ### Is there any change in gflags? -A: Yes. For more information, see [known gflags changes](https://github.com/vesoft-inc/nebula-graph/issues/858). +A: Yes. For more information, see [github issues](https://github.com/vesoft-inc/nebula/issues/2501). ### What are the differences between deleting data then installing the new version and upgrading according to this topic?