Chapter 38. Rolling Upgrades
38.1. Rolling Upgrades
Rolling upgrades of Red Hat JBoss Data Grid enable clusters to upgrade to new versions without downtime. Nodes are upgraded without the need to restart the application or risk of data loss.
JBoss Data Grid supports rolling upgrades in Remote Client-Server mode only.
In earlier releases, JBoss Data Grid allowed you to perform rolling upgrades using the REST interface. As of 7.2, JBoss Data Grid supports rolling upgrades using Hot Rod only.
To ensure data consistency, you should ensure that cache entries in the source cluster are not updated during the rolling update.
38.2. Performing Rolling Upgrades Using Hot Rod
The following process is used to perform rolling upgrades on Red Hat JBoss Data Grid running in Remote Client-Server mode using Hot Rod. This procedure is designed to upgrade the data grid itself and does not upgrade the client application.
Ensure that the correct version of the Hot Rod protocol is used with your JBoss Data Grid version. This version must be specified on the client programmatically. Refer to the Developer Guide for instructions on defining the client version.
Hot Rod protocol versions for each JBoss Data Grid release are as follows:
- JBoss Data Grid 7.2 requires Hot Rod protocol version 2.6
- JBoss Data Grid 7.1 requires Hot Rod protocol version 2.5
- JBoss Data Grid 7.0 requires Hot Rod protocol version 2.5
- JBoss Data Grid 6.6 requires Hot Rod protocol version 2.3
- JBoss Data Grid 6.5 requires Hot Rod protocol version 2.0
- JBoss Data Grid 6.4 requires Hot Rod protocol version 2.0
- JBoss Data Grid 6.3 requires Hot Rod protocol version 2.0
- JBoss Data Grid 6.2 requires Hot Rod protocol version 1.3
- JBoss Data Grid 6.1 requires Hot Rod protocol version 1.2
Prerequisite
This procedure assumes that a cluster is already configured and running, and that it is using an older version of JBoss Data Grid. This cluster is referred to below as the Source Cluster and the Target Cluster refers to the new cluster to which data will be migrated.
Configure the Target Cluster
Use either different network settings or a different JGroups cluster name to set the Target Cluster (consisting of nodes with new JBoss Data Grid) apart from the Source Cluster. For each cache, configure a
RemoteCacheStorewith the following settings:-
Ensure that
remote-serverpoints to the Source Cluster. - Ensure that the cache name matches the name of the cache on the Source Cluster.
-
Ensure that
hotrod-wrappingis enabled (set totrue). -
Ensure that
purgeis disabled (set tofalse). Ensure that
passivationis disabled (set tofalse).Figure 38.1. Configure the Target Cluster with a RemoteCacheStore

NoteSee the $JDG_HOME/docs/examples/configs/[path]standalone-hotrod-rolling-upgrade.xml file for a full example of the Target Cluster configuration for performing Rolling Upgrades.
-
Ensure that
Start the Target Cluster
Start the Target Cluster’s nodes. Configure each client to point to the Target Cluster instead of the Source Cluster. Eventually, the Target Cluster handles all requests instead of the Source Cluster. The Target Cluster then lazily loads data from the Source Cluster on demand using the
RemoteCacheStore.Figure 38.2. Clients point to the Target Cluster with the Source Cluster as
RemoteCacheStorefor the Target Cluster.
Dump the Source Cluster keyset
When all connections are using the Target Cluster, the keyset on the Source Cluster must be dumped. This can be done using either JMX or the CLI:
JMX
Invoke the
recordKnownGlobalKeysetoperation on theRollingUpgradeManagerMBean on the Source Cluster for every cache that must be migrated.CLI
Invoke the
upgrade --dumpkeyscommand on the Source Cluster for every cache that must be migrated, or use the--allswitch to dump all caches in the cluster.
Fetch remaining data from the Source Cluster
The Target Cluster fetches all remaining data from the Source Cluster. Again, this can be done using either JMX or CLI:
JMX
Invoke the
synchronizeDataoperation and specify thehotrodparameter on theRollingUpgradeManagerMBean on the Target Cluster for every cache that must be migrated.CLI
Invoke the
upgrade --synchronize=hotrodcommand on the Target Cluster for every cache that must be migrated, or use the--allswitch to synchronize all caches in the cluster.
Disabling the RemoteCacheStore
Once the Target Cluster has obtained all data from the Source Cluster, the
RemoteCacheStoreon the Target Cluster must be disabled. This can be done as follows:JMX
Invoke the
disconnectSourceoperation specifying thehotrodparameter on theRollingUpgradeManagerMBean on the Target Cluster.CLI
Invoke the
upgrade --disconnectsource=hotrodcommand on the Target Cluster.
Decommission the Source Cluster
As a final step, decommission the Source Cluster.
38.3. RollingUpgradeManager Operations
The RollingUpgradeManager Mbean handles the operations that allow data to be migrated from one version of Red Hat JBoss Data Grid to another when performing rolling upgrades. The RollingUpgradeManager operations are:
-
recordKnownGlobalKeysetretrieves the entire keyset from the cluster running on the old version of JBoss Data Grid. -
synchronizeDataperforms the migration of data from the Source Cluster to the Target Cluster, which is running the new version of JBoss Data Grid. -
disconnectSourcedisables the Source Cluster, the older version of JBoss Data Grid, once data migration to the Target Cluster is complete.
38.4. RemoteCacheStore Parameters for Rolling Upgrades
38.4.1. rawValues and RemoteCacheStore
By default, the RemoteCacheStore store’s values are wrapped in InternalCacheEntry. Enabling the rawValues parameter causes the raw values to be stored instead for interoperability with direct access by RemoteCacheManagers.
rawValues must be enabled in order to interact with a Hot Rod cache via both RemoteCacheStore and RemoteCacheManager.
38.4.2. hotRodWrapping
The hotRodWrapping parameter is a shortcut that enables rawValues and sets an appropriate marshaller and entry wrapper for performing Rolling Upgrades.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.