此内容没有您所选择的语言版本。
Chapter 38. Rolling Upgrades
38.1. Performing Rolling Upgrades 复制链接链接已复制到粘贴板!
Upgrade Red Hat JBoss Data Grid clusters without downtime or data loss.
You can perform rolling upgrades only:
- in Remote Client-Server mode.
- using the Hot Rod protocol.
See the following Red Hat KCS solutions for additional detail:
38.1.1. Setting Up the Target Cluster 复制链接链接已复制到粘贴板!
The target cluster is the desired version of JBoss Data Grid to which you migrate data.
Rolling upgrades are supported from JBoss Data Grid version 6.6.2.
- Start the target cluster with unique network properties or a different JGroups cluster name to keep it separate from the source cluster.
Configure a
RemoteCacheStoreon each node in the target cluster for each cache you want to migrate from the source cluster.NoteThe
RemoteCacheStoreon the target cluster is in addition to any other persistent store.RemoteCacheStoresettings-
remote-servermust point to the source cluster via theoutbound-socket-bindingproperty. -
remoteCacheNamemust match the cache name on the source cluster. -
hotrod-wrappingmust betrue(enabled). -
sharedmust betrue(enabled). -
purgemust befalse(disabled). -
passivationmust befalse(disabled). protocol-versionmatches the Hot Rod protocol version of the source cluster.Expand JBoss Data Grid Version
Hot Rod Protocol Version
7.2
2.6
7.1
2.6
7.0
2.5
6.6.2
2.4 (Requires 2.5.)
If you plan to perform a rolling upgrade from JBoss Data Grid version 6.6.2, contact your Red Hat support team to upgrade to Hot Rod version 2.5.
-
Example RemoteCacheStore Configuration
38.1.2. Migrating Data to the Target Cluster 复制链接链接已复制到粘贴板!
Configure the target cluster to handle all client requests instead of the source cluster:
- Configure all clients to point to the target cluster instead of the source cluster.
Restart each client node.
The target cluster lazily loads data from the source cluster on demand via
RemoteCacheStore.
Fetch data from the source cluster.
NoteYou synchronize data on the target cluster to fetch data from the source cluster. If you are migrating from JBoss Data Grid 6.6.2, you must synchronize data on each node in the target cluster.
Do one of the following on the target cluster for each cache that you want to migrate:
- JMX
-
Invoke the
synchronizeDataoperation and specify thehotrodparameter on theRollingUpgradeManagerMBean. See RollingUpgradeManager. - CLI
JDG_HOME/bin/cli.sh --connect controller=127.0.0.1:9990 -c "/subsystem=datagrid-infinispan/cache-container=clustered/distributed-cache=MyCache:synchronize-data(migrator-name=hotrod)"
$ JDG_HOME/bin/cli.sh --connect controller=127.0.0.1:9990 -c "/subsystem=datagrid-infinispan/cache-container=clustered/distributed-cache=MyCache:synchronize-data(migrator-name=hotrod)"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Data migrates to all nodes in the target cluster in parallel, with each node receiving a subset of the data.
Use the following parameters to tune the operation:
-
read-batchconfigures the number of entries to read from the source cluster at a time. The default value is10000. write-threadsconfigures the number of threads used to write data. The default value is the number of processors available.For example:
synchronize-data(migrator-name=hotrod, read-batch=100000, write-threads=3)
-
The synchronizeData method call is blocking so no other operations are performed until the data migration is complete.
38.1.3. Finalizing Rolling Upgrades 复制链接链接已复制到粘贴板!
After the target cluster fetches all data from the source cluster, do the following:
Disable the
RemoteCacheStoreon the target cluster.NoteYou must complete this step on each node in the target cluster.
Do one of the following:
- JMX
-
Invoke the
disconnectSourceoperation and specify thehotrodparameter on theRollingUpgradeManagerMBean. See RollingUpgradeManager. - CLI
JDG_HOME/bin/cli.sh --connect controller=127.0.0.1:9990 -c "/subsystem=datagrid-infinispan/cache-container=clustered/distributed-cache=MyCache:disconnect-source(migrator-name=hotrod)"
$ JDG_HOME/bin/cli.sh --connect controller=127.0.0.1:9990 -c "/subsystem=datagrid-infinispan/cache-container=clustered/distributed-cache=MyCache:disconnect-source(migrator-name=hotrod)"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Decommission the source cluster.