How to Upgrade ScalarDB
This guide explains how to upgrade to a newer version of ScalarDB.
Before you begin
Before you upgrade ScalarDB Cluster to a newer version, check the following rules to ensure compatibility between ScalarDB Cluster and the client SDKs.
Versions are expressed as x.y.z
, where x
represents the major version, y
represents the minor version, and z
represents the patch version. This format follows Semantic Versioning.
- If the major versions are different between ScalarDB Cluster and a client SDK, they are not compatible and are not supported.
- If the major versions are the same and the minor versions are different between ScalarDB Cluster and a client SDK, the version of ScalarDB Cluster must be greater than or equal to the client SDK version. For example:
- Supported: Combination of ScalarDB Cluster 3.13 and client SDK 3.11
- Not supported: Combination of ScalarDB Cluster 3.11 and client SDK 3.13
- If the major versions and the minor versions are the same, you can use different patch versions between ScalarDB Cluster and a client SDK. For example:
- Supported: Combination of ScalarDB Cluster 3.13.2 and client SDK 3.13.0
- Supported: Combination of ScalarDB Cluster 3.13.0 and client SDK 3.13.2
Upgrade versions
To learn about upgrading your version of ScalarDB, select the type of upgrade you want to do.
- Upgrade to a major version
- Upgrade to a minor version
- Upgrade to a patch version
Major versions do not keep backward compatibility. So, you might need to do special operations when you upgrade from one major version to another major version. For example:
- Update the database schema on the backend database side.
- Update the API in your application.
For details on what you need when you upgrade to a major version, please refer to the release notes for the major version that you want to upgrade to.
Minor versions keep backward compatibility. So, you can upgrade ScalarDB from one minor version to another minor version in the same major version without doing any special operations. For example, you don't need to update the database schema on the backend database side or update the API in your application.
- ScalarDB Cluster (Enterprise Edition)
- ScalarDB Core library (Community edition)
If you use Scalar Helm Chart to deploy ScalarDB Cluster, you can upgrade your ScalarDB Cluster deployment as follows:
-
Set the ScalarDB Cluster Helm Chart version as an environment variable. You can do this by running the following command to put the chart version into the environment variable
SCALAR_DB_CLUSTER_CHART_VERSION
:SCALAR_DB_CLUSTER_CHART_VERSION=1.5.0
tipYou can search for the chart version that corresponds to the ScalarDB Cluster version, run the following command:
helm search repo scalar-labs/scalardb-cluster -l
The following command might be helpful, but please make sure to replace the contents in the angle brackets with your version of ScalarDB Cluster:
SCALAR_DB_CLUSTER_VERSION=<MAJOR>.<MINOR>.<PATCH>; SCALAR_DB_CLUSTER_CHART_VERSION=$(helm search repo scalar-labs/scalardb-cluster -l | grep -F "${SCALAR_DB_CLUSTER_VERSION}" | awk '{print $2}' | sort --version-sort -r | head -n 1)
-
Upgrade your ScalarDB Cluster deployment by replacing the contents in the angle brackets as described:
helm upgrade <RELEASE_NAME> scalar-labs/scalardb-cluster -n <NAMESPACE> -f /<PATH_TO_YOUR_CUSTOM_VALUES_FILE_FOR_SCALARDB_CLUSTER> --version ${SCALAR_DB_CLUSTER_CHART_VERSION}
After you upgrade the ScalarDB Cluster deployment, you should consider upgrading the version of the ScalarDB Cluster Java Client SDK or the ScalarDB Cluster .NET Client SDK on your application side.
ScalarDB Core is provided as a Java library. So, you can update the dependencies of your Java project and rebuild your application to upgrade ScalarDB versions.
Patch versions keep backward compatibility. So, you can upgrade ScalarDB from one patch version to another patch version in the same major version and minor version without doing any special operations. For example, you don't need to update the database schema on the backend database side or update the API in your application.
The method for upgrading to a patch version is the same as for upgrading to a minor version. For details on how to upgrade, see the Upgrade to a minor version tab.
ScalarDB does not support downgrading to a previous version (major, minor, or patch). You can only upgrade to a newer version.