Upgrade to SingleStore 8. 5
On this page
Note
Please note the following before upgrading your cluster:
-
SingleStore betas and release candidates cannot be upgraded unless explicitly stated in the release notes.
-
As of SingleStore 7.
8, a new reserved prefix for column names has been introduced: _
.$!$ -
This prefix is reserved for internal use only.
Before upgrading SingleStore, SingleStore recommends renaming existing columns prefixed with " _
" to avoid potential issues in the future.$!$ -
While this is not mandatory, and DML commands will still allow access to existing objects using this prefix, DDL commands will no longer allow column names to be created with this prefix.
-
-
If any host in the cluster is near or at disk capacity, please increase available storage before upgrading.
Important Notes About Upgrading
This topic describes how to upgrade SingleStore.
Once the upgrade is complete, refer to the Post-Upgrade Considerations section for additional information on behavioral changes that you should be aware of.
Backups
MemSQL 6.
If you need to keep older backups for an extended period of time, consider implementing one of the following recommendations:
-
Maintain a 7.
5 or earlier installation in a test or pre-production environment to be used in case you ever need to restore 6. 8 and earlier backups. -
Upgrade the backups by restoring them into a 7.
0 to 7. 5 test or pre-production environment, then backing up the data again. Validate the new backups by restoring them. After that discard the older release backups.
Plancache
Plans in the plancache are dependent upon the specific SingleStore patch version, so when you upgrade to a new SingleStore version, all previously compiled plans will be invalidated.
Non-Sync Variables
By default, convert_
is set to TRUE
as of SingleStore 7.
Secure Connections
As of SingleStore 8.
Verify Your Cluster is Ready for Upgrade
Warning
Only clusters that are running SingleStore 7.
If upgrading from SingleStore 7.
To upgrade from MemSQL 6.
-
Upgrade to SingleStore 7.
3. -
Use this guide to upgrade to SingleStore 8.
5.
Prior to upgrading your cluster, SingleStore recommends that you take a backup as a standard precautionary measure.
In addition, run the following SQL commands from the Master Aggregator to confirm that the following are true.
-
All leaf nodes ("leaves") are online.
SHOW LEAVES; -
All aggregators are online.
SHOW AGGREGATORS; -
There are no partitions with an
Orphan
role.SHOW CLUSTER STATUS; -
No rebalance or restore redundancy is necessary.
EXPLAIN REBALANCE PARTITIONS;EXPLAIN RESTORE REDUNDANCY;
After you have backed up your data and verified your cluster is ready, you are ready to upgrade your cluster to the latest version of SingleStore using the SingleStore management tools.
Upgrade Your Cluster
Upgrade Versions and Methods
The tables below depict which versions of SingleStore can be upgraded to SingleStore8.
-
Offline upgrade: Your SingleStore cluster will be shut down and restarted over the course of the upgrade
-
Online upgrade: Your SingleStore cluster will not be shut down over the course of the upgrade
Upgrade via SingleStore Toolbox
Upgrade from |
Offline upgrade |
Online upgrade |
---|---|---|
7. |
✔ |
✔ |
Step 1: Upgrade SingleStore Toolbox
To upgrade to SingleStore 8.
Run the install
command to either install Toolbox if it is not already installed, or upgrade an existing version of Toolbox to the latest version of the package.
Red Hat
sudo yum install singlestoredb-toolbox -y
Debian
-
SingleStore packages are signed to ensure integrity, so the GPG key needs to be added to this host.
When done, verify that the SingleStore signing key has been added using apt-key list
.wget -O - 'https://release.memsql.com/release-aug2018.gpg' 2>/dev/null | sudo apt-key add - && apt-key listWithout using
apt-key
:wget -q -O - 'https://release.memsql.com/release-aug2018.gpg' | sudo tee /etc/apt/trusted.gpg.d/memsql.asc 1>/dev/null -
Upgrade Toolbox.
sudo apt install singlestoredb-toolbox -y
Upgrade without Internet Access
If your cluster does not have internet access, use one of the following buttons to download either the latest RPM or Debian singlestoredb-toolbox
package to a location accessible by your cluster:
Then, run the install
command for the installed package manager and specify the path to the package.
Red Hat
sudo yum install /path/to/singlestoredb-toolbox.rpm -y
Debian
sudo apt install /path/to/singlestoredb-toolbox.deb -y
Step 2: Upgrade SingleStore
The simplest and preferred upgrade option is an offline cluster upgrade.
If the cluster is running with High Availability, you also have the option to perform an incremental online cluster upgrade, which maintains cluster availability throughout the upgrade process.
Select an option below to upgrade your cluster.
Option 1: Offline Upgrade
Note: Using this method to upgrade SingleStore is referred to as an offline
upgrade as your SingleStore cluster will be shut down and restarted over the course of the upgrade.
Run the following command to start an offline upgrade.
-
Confirm that the cluster can be upgraded.
The cluster will not be upgraded when running this command. sdb-deploy upgrade --precheck-only -
Upgrade your cluster.
Note:
sdb-deploy upgrade
will perform a snapshot of all databases prior to upgrade.sdb-deploy upgrade --version 8.5
If you do not specify a patch version, your cluster will be upgraded to the latest patch version of SingleStore 8.
During the upgrade process, you will be prompted to enable synchronous replication on your existing databases, or to leave those databases using the previous asynchronous replication behavior.
As of SingleStore 7.
Note: You cannot downgrade from your current version.
If your cluster does not have internet access, use one of the following buttons to download either the latest RPM or Debian singlestoredb-server
package to a location accessible by your cluster:
The singlestoredb-server
package contains both the SingleStore binary and the low-level management tool, memsqlctl
.
Run the sdb-deploy upgrade
command and reference the appropriate package in the --file-path
option.upgrade
(as opposed to simply upgrading the package via the package manager) will perform an offline restart of all the nodes to make sure the cluster is using the new version.
Red Hat
sdb-deploy upgrade --file-path /path/to/singlestoredb-server.rpm
Debian
sdb-deploy upgrade --file-path /path/to/singlestoredb-server.deb
Refer to sdb-deploy upgrade for more information.
Once the upgrade is complete, refer to the Post-Upgrade Considerations section for any changes between versions that may impact your cluster.
Option 2: Online Upgrade
This upgrade method is referred to as an online
upgrade as your SingleStore cluster will not be shut down over the course of the upgrade.
Note
An online upgrade may fail if a long-running workload that writes to the database, or a workload that manipulates SingleStore files (such as an automated backup or maintenance script), is running on the target cluster.
Toolbox 1.
Run the following command to start an online upgrade.
-
Confirm that the cluster can be upgraded.
The cluster will not be upgraded when running this command. sdb-deploy upgrade --precheck-only -
Upgrade your cluster.
Note:
sdb-deploy upgrade
will perform a snapshot of all databases prior to upgrade.sdb-deploy upgrade --online --version 8.5
By specifying --version
, your cluster will be upgraded to the latest patch version of SingleStore 8.
During the upgrade process, you will be prompted to enable synchronous replication on your existing databases.
Note: You cannot downgrade from your current version.
If your cluster does not have internet access, use one of the following buttons to download either the latest RPM or Debian singlestoredb-server
package to a location accessible by your cluster:
The singlestoredb-server
package contains both the SingleStore binary and the low-level management tool, memsqlctl
.
Run the sdb-deploy upgrade --online
command and reference the appropriate package in the --file-path
option.upgrade
(as opposed to simply upgrading the package via the package manager) will perform an offline restart of all the nodes to make sure the cluster is using the new version.
Red Hat
sdb-deploy upgrade --online --file-path /path/to/singlestoredb-server.rpm
Debian
sdb-deploy upgrade --online --file-path /path/to/singlestoredb-server.deb
Refer to sdb-deploy upgrade for more information.
Once the upgrade is complete, refer to the Post-Upgrade Considerations section for any changes between versions that may impact your cluster.
Confirm that the Upgrade Succeeded
Toolbox displays the progress of the upgrade and reports whether the upgrade succeeded.
-
Confirm that all nodes are online and healthy.
The
State
column should displayonline
for each node.sdb-admin show-cluster✓ Successfully ran 'memsqlctl show-cluster' +---------------------+-----------+------+--------------------+-----------+-----------+--------+--------------------+------------------------------+--------+-------------------+ | Role | Host | Port | Availability Group | Pair Host | Pair Port | State | Opened Connections | Average Roundtrip Latency ms | NodeId | Master Aggregator | +---------------------+-----------+------+--------------------+-----------+-----------+--------+--------------------+------------------------------+--------+-------------------+ | Leaf | 127.0.0.1 | 3307 | 1 | null | null | online | 2 | | 2 | | | Aggregator (Leader) | 127.0.0.1 | 3306 | | null | null | online | 0 | null | 1 | Yes | +---------------------+-----------+------+--------------------+-----------+-----------+--------+--------------------+------------------------------+--------+-------------------+
-
Confirm that all databases are healthy.
The
summary
column should displayhealthy
for each database.sudo memsqlctl query --sql "SELECT * FROM information_schema.MV_DISTRIBUTED_DATABASES_STATUS;"+---------------+----------------+--------------------+---------+--------+-------------+------------+---------+------------+---------------+---------+---------------+ | database_name | num_partitions | num_sub_partitions | summary | online | replicating | recovering | pending | transition | unrecoverable | offline | sync_mismatch | +---------------+----------------+--------------------+---------+--------+-------------+------------+---------+------------+---------------+---------+---------------+ | test | 16 | 64 | healthy | 16 | 16 | 0 | 0 | 0 | 0 | 0 | 0 | +---------------+----------------+--------------------+---------+--------+-------------+------------+---------+------------+---------------+---------+---------------+
-
Confirm that all nodes reflect the version specified in the
sdb-deploy upgrade
command.The
Version
column displays the version that each node is running.sdb-admin list-nodes+------------+--------+-----------+------+---------------+--------------+---------+----------------+--------------------+--------------+ | MemSQL ID | Role | Host | Port | Process State | Connectable? | Version | Recovery State | Availability Group | Bind Address | +------------+--------+-----------+------+---------------+--------------+---------+----------------+--------------------+--------------+ | CBDC2807B7 | Master | 127.0.0.1 | 3306 | Running | True | 8.7.11 | Online | | 127.0.0.1 | | EC33CC5A08 | Leaf | 127.0.0.1 | 3307 | Running | True | 8.7.11 | Online | 1 | 127.0.0.1 | +------------+--------+-----------+------+---------------+--------------+---------+----------------+--------------------+--------------+
Roll Back from a Failed Upgrade
Currently, SingleStore does not support downgrading directly.
Note that a backup created from a given version of the SingleStore engine can only be restored to the same engine version or later.
-
Make a backup of the cluster configuration.
sdb-deploy generate-cluster-file -
Delete all of the nodes in the cluster.
sdb-admin delete-node --stop --all -
Use the following command to roll back to an earlier version of the SingleStore engine by removing the engine version(s) you do not want.
For example, if upgrading to SingleStore 8.
5 fails, remove 8. 5. sdb-deploy uninstall --version 8.5 -
Unregister all hosts in the cluster.
sdb-toolbox-config unregister-host --all -
Recreate the cluster using the cluster configuration captured in the cluster file.
Note that the cluster file may contain the engine version, so be sure to update the cluster file with the engine version you wish to restore. sdb-deploy setup-cluster --cluster-file /path/to/cluster/file -
Restore the cluster's data from the backup that was made earlier.
Refer to Back Up and Restore Data for more information.
Post-Upgrade Considerations
Collect Event Traces
Existing cluster monitoring instances can be configured to collect event traces after upgrading a cluster to SingleStore v8.
Run the following command to restart monitoring and collect event traces.
HTTP Connections
sdb-admin start-monitoring \--database-name metrics \--collect-event-traces \--exporter-host <exporter-hostname-or-IP-address> \--user root \--password <secure-password> \--retention-period 10
HTTPS Connections
sdb-admin start-monitoring \--database-name metrics \--collect-event-traces \--exporter-host=<exporter-hostname-or-IP-address> \--user root \--password=<secure-password> \--retention-period 10 \--ssl-ca=/path/to/ca-cert.pem --or----ssl-capath=/ca-directory/including/path
System Behavior
When upgrading to SingleStore 8.
-
In some versions, the default value for a configuration variable was changed compared to previous versions, but clusters upgraded from earlier versions retain their previous setting, both if it was set to a specific value or if it was not explicitly set and hence using the previous default.
In some of these cases, SingleStore recommends to update your configuration to the new default if you were previously using the old default, after appropriate testing. -
Some new features are automatically enabled by default on newly installed SingleStore 8.
5 clusters but not automatically enabled on clusters upgraded from an earlier version to 8. 5. In some of these cases, SingleStore recommends to enable the new features, after appropriate testing.
Upgrades to 8. 5
-
To reduce your total cost of ownership (TCO), you may be able store data in Universal Storage instead of rowstores.
This is because rowstores store their data in RAM, which can be costly. Universal Storage now supports upserts, which were previously only supported in rowstores. -
You may want to run the command REBALANCE ALL DATABASES.
This command rebalances each database in the cluster, in alphabetical order of the database name. When a rebalance runs on a database d
, it first considers the placement of the partitions of the other databases in the cluster before rebalancing the partitions ofd
. -
You may want to set the
cardinality_
engine variable toestimation_ level '7.
.3' This setting uses sampling and histograms together (when both are available) to improve selectivity estimation. The default setting is '7.
.1' -
Changing the value of the
data_
engine variable can change the behavior of expressions in computed columns.conversion_ compatibility_ level Refer to the Data Type Conversion section of Data Types for more information. -
sp_
should be turned off if an application breaks post-upgrade due to a change in type conversion behavior.query_ dynamic_ param See the Example: Changes in Type Conversion Behavior for more information. -
Upgrading the cluster, with
json_
set toextract_ string_ collation auto
(default setting), changes the collation settings forJSON_
fromEXTRACT_ STRING json
toserver
.Refer to In-Depth Variable Definitions for information on json_
settings.extract_ string_ collation
Last modified: September 10, 2024