How to Upgrade ScalarDB
This guide explains how to upgrade to a newer version of ScalarDB.
Before you begin
Before you upgrade to a new version, please check the ScalarDB Cluster Compatibility Matrix to ensure compatibility between ScalarDB Cluster and the client SDKs.
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.