GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.voltactivedata.com — 4.4. Upgrading Existing VoltDB Installations Administrator's Guide4.4. Upgrading Existing VoltDB InstallationsAs new versions of VoltDB become available, you will want to upgrade the VoltDB software on your database cluster. The simplest approach for upgrading recent versions of VoltDB — V6.8 or later — is to perform an orderly shutdown saving a final snapshot, upgrade the software on all servers, then re-start the database. (If you are upgrading from earlier versions of the software, you can still upgrade using a snapshot. But you will need to perform the save and restore operations manually.) However, upgrading using snapshots involves downtime while the software is being updated. Two alternatives for upgrading VoltDB without downtime are in-service upgrades — upgrading nodes of the cluster one at a time — and using cross data center replication (XDCR) to upgrade clusters. An in-service upgrade (a separately licensable feature of VoltDB) lets you upgrade a single running cluster by removing individual nodes, upgrading the VoltDB software, then rejoining the node to the cluster. The cluster continues to process transactions throughout the upgrade process, During the upgrade, the cluster operates as the older version software. Once all of the nodes are upgraded, the cluster transitions to the new version. Using cross data center replication (XDCR), it is possible to use two or more clusters to perform an online upgrade, where there is no downtime and the database is accessible throughout the upgrade operation. If two or more clusters are already active participants in an XDCR environment, you can shutdown and upgrade the clusters, one at a time, to perform the upgrade leaving at least one cluster available at all times. The following sections describe four approaches to upgrading existing VoltDB installations, starting with how to replace the software itself: 4.4.1. Upgrading the VoltDB SoftwareUpdating the VoltDB software is very simple. However, you must make sure you perform this step at the right stage in the upgrade process, as described in the following sections. The product comes as a .tar.gz file. When the time comes to upgrade the software, you unpack the tar file and move the resulting folder to replace your current installation. For example, if you have the VoltDB software installed as /var/voltdb, the software installation looks like the following, where you delete the previous version and replace it with the new one: $ tar -zxvf voltdb-ent-n.n.n-xxxx.tar.gz -C /var $ cd /var $ rm -vr voltdb $ mv voltdb-ent-n.n.n-xxxx voltdb Remember, when upgrading an existing installation with a running database, you need to upgrade both the software and the database itself. Which means you must make sure you perform the update steps in the correct order. The following sections explain the different options for updating existing installations, including at what stage in the process you should replace the software. 4.4.2. Upgrading VoltDB Using Save and RestoreUpgrading the VoltDB software on a single database cluster is easy. All you need to do is perform an orderly shutdown saving a final snapshot, upgrade the VoltDB software on all servers in the cluster, then restart the database. The steps to perform this procedure are:
This process works for any recent (V6.8 or later) release of VoltDB. 4.4.3. Upgrading Older Versions of VoltDB ManuallyTo upgrade older versions of VoltDB software (prior to V6.8), you must perform the save and restore operations manually. The steps when upgrading from older versions of VoltDB are:
4.4.4. Performing an In-Service Upgrade of a Single ClusterNormally, when upgrading the VoltDB software, you must shutdown the cluster (for example, with the voltadmin shutdown --save command) and restart the entire cluster using the new software. Downtime can be avoided by performing an in-service upgrade. An in-service upgrade allows a K-safe cluster to be upgraded one node at a time, rather than the entire cluster all at once. This means the cluster, and the business processes it supports, remain available throughout the upgrade procedure. The requirements for performing an in-service upgrade are:
To perform an in-service upgrade on bare metal servers, you upgrade the VoltDB software on each node consecutively. Specifically:
During the upgrade process, you can determine which nodes have been updated using the @SystemInformation system procedure with the OVERVIEW selector and looking for the VERSION keyword. For example, in the following command output, the first column is the host ID and the last column is the currently installed software version for that host. Once all hosts report using the upgraded software version, the upgrade is complete. $ echo "exec @SystemInformation overview" | sqlcmd | grep VERSION
2 VERSION 13.1.2
1 VERSION 13.1.2
0 VERSION 13.1.3 Until the upgrade process is complete, all nodes in the cluster maintain the functionality of the lower version, even for those nodes that have already upgraded to the higher version software. Once the upgrade is complete and all nodes are running on the newer version, the cluster switches to operating with the higher version functionality. In other words, if the new software contains any new function or behavior, that feature will not be accessible until the entire in-service upgrade process is complete. If the upgrade fails for any reason, or you choose to stop the upgrade midway, you can revert to the original version by reversing the process: removing a node that has been upgraded, replace the VoltDB software with the original version, rejoin the node and repeat for all nodes that were upgraded. Once the upgrade process is complete, the in-service upgrade is over. At which point, you can longer return to the previous version through an in-service upgrade and must perform a full cluster restart to downgrade. 4.4.4.1. The Scope of In-Service UpgradesThere are limits to which software versions can use in-service upgrades. The following table describes the rules for which releases can be upgraded with an in-service upgrade and which releases cannot.
4.4.5. Performing an Online Upgrade Using Multiple XDCR ClustersIt is also possible to upgrade the VoltDB software using cross data center replication (XDCR), by simply shutting down, upgrading, and then re-initalizing each cluster, one at a time. This process requires no downtime, assuming your client applications are already designed to switch between the active clusters. Use of XDCR for upgrading the VoltDB software is easiest if you are already using XDCR because it does not require any additional hardware or reconfiguration. The following instructions assume that is the case. Of course, you could also create a new cluster and establish XDCR replication between the old and new clusters just for the purpose of upgrading VoltDB. The steps for the upgrade outlined in the following sections are the same. But first you must establish the cross data center replication between the two (or more) clusters. See the chapter on Database Replication in the Using VoltDB manual for instructions on completing this initial step. Once you have two clusters actively replicating data with XCDCR (let's call them clusters A and B), the steps for upgrading the VoltDB software on the clusters is as follows:
Note that since you are upgrading the software, you must create a new instance after the upgrade (step #3). When upgrading the software, you cannot recover the database using just the voltdb start command; you must use voltdb init --force first to create a new instance and then reload the existing data from the running cluster B. Also, be sure all data has been copied to the upgraded cluster A after step #4 and before
proceeding to upgrade the second cluster. You can do this by checking the @Statistics system procedure selector DRCONSUMER
on cluster A. Once the DRCONSUMER statistics 4.4.5.1. Falling Back to a Previous VersionIn extreme cases, you may decide after performing the upgrade that you do not want to use the latest version of VoltDB. If this happens, it is possible to fall back to the previous version of VoltDB. To "downgrade" from a new version back to the previous version, follow the steps outlined in Section 4.4.5, “Performing an Online Upgrade Using Multiple XDCR Clusters” except rather than upgrading to the new version in Step #2, reinstall the older version of VoltDB. This process is valid as long as you have not modified the schema or deployment to use any new or changed features introduced in the new version. 4.4.6. Downgrading, or Falling Back to a Previous VoltDB VersionThe section describing the upgrade process for active XDCR explains how to fall back to the previous version of VoltDB in case of emergency. This section explains how to fall back, or downgrade, when using the standard save and restore process described in Section 4.4.2, “Upgrading VoltDB Using Save and Restore”. The following process works if you are reverting between two recent versions of VoltDB and you do not use any new features between the upgrade and the downgrade. There are no guarantees an attempt to downgrade will succeed if the two software versions are more than one major version apart or if you utilize a new feature from the higher version software prior to downgrading. With those caveats, the most reliable way to fall back to a previous VoltDB version is:
This process ensures that only the schema, stored procedures, and data are returned to the older version of the software, and new software features will not impact your restore process. For example: $ voltdb get schema -D ~/db/new --output=/tmp/mydb.sql $ voltdb get classes -D ~/db/new --output=/tmp/mydb.jar $ voltadmin pause $ voltadmin save /tmp mydata $ voltadmin shutdown [ downgrade VoltDB software . . . ] $ voltdb init -f -D ~/db/old --schema=/tmp/mydb.sql --classes=/top/mydb.jar $ voltdb start -D ~/db/old --pause & $ voltadmin restore /tmp mydata $ voltadmin resume |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |