Skip to content

Commit 4e6cfff

Browse files
committed
PXC-5225 [DOCS] - Improve the documentation to suggest best practices on PXC minor upgrade 8.4
modified: docs/upgrade-guide.md
1 parent 9e6f040 commit 4e6cfff

1 file changed

Lines changed: 76 additions & 73 deletions

File tree

docs/upgrade-guide.md

Lines changed: 76 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Upgrade Percona XtraDB Cluster
22

3-
___You must make backups before attempting an upgrade.___
3+
!!! warning "Required: Back up before upgrading"
4+
Create backups before attempting any upgrade.
45

5-
This guide explains how to upgrade a Percona XtraDB Cluster to version 8.4 without causing downtime. This process is called a “rolling upgrade,” which means you can upgrade the cluster one node at a time without shutting down the whole cluster. Keep in mind that rolling upgrades to 8.4 are only supported if your current version is 8.0 or newer. Be sure you are running on the latest 8.0 version before you upgrade to 8.4.
6+
This guide describes how to upgrade Percona XtraDB Cluster to version 8.4 without downtime. A rolling upgrade updates one node at a time while the cluster remains operational. Rolling upgrades to 8.4 require version 8.0 or later. Upgrade to the latest 8.0 release before upgrading to 8.4.
67

78
!!! warning
89

9-
A node with a newer (higher) protocol version cannot join a cluster running an older (lower) Galera Communication System (GCS) protocol version. The cluster enforces this rule to prevent data corruption or incompatibility issues that may arise if a node introduces a feature the cluster doesn't understand.
10+
A node with a newer protocol version cannot join a cluster running an older Galera Communication System (GCS) protocol version. The cluster enforces this rule to prevent data corruption and incompatibility issues.
1011

11-
Run the command on a current cluster member and on the node that is about to join, then compare the two outputs.
12+
Run the following command on a cluster member and on the joining node, then compare the outputs.
1213

1314
```sql
1415
SHOW STATUS LIKE 'wsrep_protocol_version';
@@ -24,54 +25,49 @@ This guide explains how to upgrade a Percona XtraDB Cluster to version 8.4 witho
2425
+------------------------+-------+
2526
```
2627

27-
Upgrading to Percona Server 8.4 is similar to upgrading between minor versions of 8.0, like from 8.0.x to 8.0.y. There are a few specific details to keep in mind for 8.4, but the overall process isn’t very different. We also recommend checking out the Percona Server upgrade documentation for more information: [Percona Server for MySQL 8.4 Upgrade Guide :octicons-link-external-16:](https://docs.percona.com/percona-server/{{vers}}/upgrade.html).
28+
Upgrading to Percona Server 8.4 follows the same process as minor 8.0 upgrades. Review the [Percona Server for MySQL 8.4 Upgrade Guide :octicons-link-external-16:](https://docs.percona.com/percona-server/{{vers}}/upgrade.html) for additional details.
2829

2930
--8<--- "get-help-snip.md"
3031

3132
## Important changes in Percona XtraDB Cluster 8.4
3233

3334
### Keyring Plugin vs. Keyring Component
3435

35-
Starting with version 8.4, Percona XtraDB Cluster (PXC) no longer supports the keyring plugin. Instead, it uses the keyring component.
36+
Percona XtraDB Cluster (PXC) 8.4 replaces the keyring plugin with the keyring component.
3637

3738
| Requirement | Details |
3839
|---------------------|----------|
39-
| In-place upgrade | During an in-place upgrade, you need to update your `my.cnf` configuration. Replace the keyring plugin settings with the keyring component configuration. This includes updating the manifest and the component configuration file. [Learn more about installing the keyring component here :octicons-link-external-16:](https://dev.mysql.com/doc/refman/8.4/en/keyring-component-installation.html). |
40-
| Rolling upgrade | When performing a rolling upgrade, the donor node (running an older version) can still use the keyring plugin, while the 8.4 node uses the keyring component. Since both use the keyring for encryption, they remain compatible and work together seamlessly. |
41-
| Other requirements | All other requirements, such as ensuring the SST (State Snapshot Transfer) channel is SSL-encrypted when using the keyring plugin or component, remain the same as in version 8.0. |
40+
| In-place upgrade | During an in-place upgrade, update your `my.cnf` configuration. Replace the keyring plugin settings with the keyring component configuration. This change includes updating the manifest and the component configuration file. [Learn more about installing the keyring component :octicons-link-external-16:](https://dev.mysql.com/doc/refman/8.4/en/keyring-component-installation.html). |
41+
| Rolling upgrade | During a rolling upgrade, the donor node (running an older version) can use the keyring plugin. The 8.4 node uses the keyring component. Both use the keyring for encryption and remain compatible. |
42+
| Other requirements | All other requirements remain the same as in version 8.0. For example, ensure the State Snapshot Transfer (SST) channel is SSL-encrypted when using the keyring plugin or component. |
4243

4344
### Default authentication plugin
4445

45-
In Percona XtraDB Cluster 8.4, the default authentication plugin is
46-
`caching_sha2_password`. In ProxySQL 2.6.2 or later, use the `caching_sha2_password` authentication method.
46+
In Percona XtraDB Cluster 8.4, the default authentication plugin is `caching_sha2_password`. In ProxySQL 2.6.2 or later, use the `caching_sha2_password` authentication method.
4747

4848
### ProxySQL 2.6.2 or later
4949

50-
If you are using a version before ProxySQL 2.6.2, the option [–syncusers](proxysql-v2.md#proxysql-admin-utilities) would not work if the Percona XtraDB Cluster user is
51-
created using `caching_sha2_password`. Use the `mysql_native_password`
52-
authentication plugin in these cases. You must manually load this authentication plugin.
50+
If you use a version before ProxySQL 2.6.2, the option [--syncusers](proxysql-v2.md#proxysql-admin-utilities) does not work if the Percona XtraDB Cluster user is created using `caching_sha2_password`. Use the `mysql_native_password` authentication plugin in these cases. You must manually load this authentication plugin.
5351

5452
## Default security and compatibility settings
5553

56-
[PXC Strict Mode](strict-mode.md#percona-xtradb-cluster-strict-mode) is enabled by default, which may result in denying any
57-
unsupported operations and may halt the server.
54+
[PXC Strict Mode](strict-mode.md#percona-xtradb-cluster-strict-mode) is enabled by default. This mode denies unsupported operations and may halt the server.
5855

59-
`pxc-encrypt-cluster-traffic` is enabled by default. You need to configure
60-
each node accordingly and avoid joining a cluster with unencrypted cluster
61-
traffic. For more information, see
62-
[Traffic encryption is enabled by default](encrypt-traffic.md#encrypt-pxc-traffic).
56+
`pxc-encrypt-cluster-traffic` is enabled by default. Configure each node accordingly and avoid joining a cluster with unencrypted cluster traffic. For more information, see [Traffic encryption is enabled by default](encrypt-traffic.md#encrypt-pxc-traffic).
6357

6458
## Do not mix PXC 8.0 nodes with PXC 8.4 nodes
6559

66-
In Percona Server for MySQL versions 8.0 and 8.4, both use Galera 4, so there are no issues at the Galera protocol layer that would prevent any node from being a writer in a mixed-version cluster. However, 8.4 introduces changes that might not work on 8.0. If you run these changes on 8.4 and replicate them to 8.0, it could cause node inconsistencies, and the node might be evicted from the cluster due to the inconsistency voting protocol.
60+
Percona Server for MySQL versions 8.0 and 8.4 both use Galera 4. No Galera protocol layer issues prevent any node from being a writer in a mixed-version cluster. However, 8.4 introduces changes that may not work on 8.0. Running these changes on 8.4 and replicating them to 8.0 can cause node inconsistencies. The cluster may evict the node due to the inconsistency voting protocol.
6761

68-
Percona Server for MySQL 8.4 also introduces several DDL (Data Definition Language) enhancements that are not supported in 8.0. If you try to run these DDL statements on 8.0, you’ll get errors. A key difference is:
62+
Percona Server for MySQL 8.4 introduces several Data Definition Language (DDL) enhancements not supported in 8.0. Running these DDL statements on 8.0 produces errors. A key difference is foreign key handling:
6963

70-
* Foreign Keys Referencing Non-Unique or Partial Keys:
64+
* Foreign keys referencing non-unique or partial keys:
7165

72-
* 8.4: Supports foreign keys referencing non-unique or partial keys.
66+
* 8.4: Supports foreign keys referencing non-unique or partial keys
7367

74-
* 8.0: Doesn’t allow this and will fail the DDL statement.
68+
* 8.0: Does not allow this configuration and fails the DDL statement
69+
70+
The following example shows a foreign key referencing a non-unique index:
7571

7672
```sql
7773
CREATE TABLE parent (
@@ -86,117 +82,124 @@ CREATE TABLE child (
8682
);
8783
```
8884

89-
Here, parent.value is indexed but not unique. In 8.4, the foreign key reference is allowed, but in 8.0, this operation fails.
85+
In this example, `parent.value` is indexed but not unique. Version 8.4 allows the foreign key reference. Version 8.0 fails this operation.
9086

91-
Since DDL is replicated as a TOI (transactional operation), it gets executed on all nodes. If it succeeds on 8.4 but fails on 8.0, the cluster will detect the inconsistency and evict the 8.0 node.
87+
DDL statements replicate as Total Order Isolation (TOI) operations and execute on all nodes. If a statement succeeds on 8.4 but fails on 8.0, the cluster detects the inconsistency and evicts the 8.0 node.
9288

93-
In a mixed-version cluster, it’s better to use the lower version node as the writer. When executing DDL, make sure it behaves the same way on all nodes.
89+
In a mixed-version cluster, use the lower version node as the writer. Verify that DDL statements behave the same way on all nodes.
9490

9591
## Major upgrade scenarios
9692

97-
Before upgrading your Percona XtraDB Cluster (PXC) to version 8.4, check your current version. You must run version 8.0 before upgrading to 8.4 - direct upgrades from older versions don't work.
98-
Here's what you need to know:
93+
Verify your version before upgrading PXC to version 8.4. Direct upgrades from versions older than 8.0 are not supported.
9994

100-
* If you run version 8.0, you can upgrade directly to 8.4
95+
* Version 8.0 clusters can upgrade directly to 8.4
10196

102-
* If you run a version older than 8.0, first upgrade to the latest 8.0 release
97+
* Clusters older than 8.0 must first upgrade to the latest 8.0 release
10398

104-
The exact upgrade steps depend on your cluster setup and database activity. Your specific configuration and workload will shape the upgrade process, so you'll need to plan accordingly.
99+
The upgrade steps vary based on cluster configuration and workload.
105100

106101
### In-place rolling upgrade
107102

108-
If you want to upgrade an N-node Percona XtraDB Cluster (PXC) cluster with minimal downtime, you can use an in-place rolling upgrade. This process updates the nodes one at a time. While upgrading, make sure your application sends writes only to lower-version nodes. You can use any node for reads.
103+
An in-place rolling upgrade updates an N-node PXC cluster with minimal downtime. This process updates nodes one at a time. During the upgrade, direct application writes only to lower-version nodes. Any node can handle reads.
109104

110-
Before upgrading, verify your application can function with a reduced cluster size. When a cluster operates with an even number of nodes, split-brain scenarios become possible.
105+
Before upgrading, verify your application can function with a reduced cluster size. A cluster with an even number of nodes can experience split-brain scenarios.
111106

112-
The upgrade process automatically detects the 8.0 data directory and initiates the upgrade during node boot-up. The data directory transforms to be compatible with PXC 8.4. Afterward, the node joins the cluster and enters a synced state. The result is a N-node cluster with N-1 8.0 and 1 8.4.
107+
The upgrade process automatically detects the 8.0 data directory and initiates the upgrade during node startup. The data directory transforms to be compatible with PXC 8.4. The node then joins the cluster and enters a synced state. The result is an N-node cluster with N-1 nodes on 8.0 and one node on 8.4.
113108

114-
Here’s how to upgrade a node from Percona XtraDB Cluster (PXC) 8.0 to 8.4:
109+
To upgrade a node from PXC 8.0 to 8.4:
115110

116-
1. Shut down an 8.0 node: Pick one of the nodes running PXC 8.0 and stop it.
111+
1. Stop one of the nodes running PXC 8.0.
117112

118-
2. Remove PXC 8.0 packages: Uninstall the PXC 8.0 packages, but make sure you don’t delete the data directory.
113+
2. Uninstall the PXC 8.0 packages. Do not delete the data directory.
119114

120-
3. Install PXC 8.4 packages: Replace the old packages with PXC 8.4 packages.
115+
3. Install the PXC 8.4 packages.
121116

122-
4. Restart the mysqld service: Start the node again.
117+
4. Start the `mysqld` service.
123118

124119
## Add 8.4 node to 8.0 cluster
125120

126-
You can upgrade a cluster by booting a fresh 8.4 node and joining it to the existing 8.0 cluster as an additional node instead of performing an in-place rolling upgrade.
121+
You can upgrade a cluster by starting a fresh 8.4 node and joining the existing 8.0 cluster as an additional node.
127122

128-
In this scenario, you have an active 3-node 8.0 cluster.
123+
This scenario assumes an active three-node 8.0 cluster:
129124

130-
1. Join the new 8.4 node to the cluster. It will get a dump of the cluster through SST and stay part of the cluster. You have a four-node cluster: three nodes running 8.0 and one node running 8.4.
125+
1. Join the 8.4 node to the cluster. The node receives a State Snapshot Transfer (SST) and joins the cluster. The cluster has four nodes: three running 8.0 and one running 8.4.
131126

132-
2. Shut down one of the 8.0 nodes and repeat the procedure to replace each 8.0 node with 8.4.
127+
2. Stop one of the 8.0 nodes. Repeat the procedure to replace each 8.0 node with 8.4.
133128

134-
3. Once all nodes are running 8.4, the upgrade is complete.
129+
3. After all nodes run 8.4, the upgrade is complete.
135130

136131
!!! warning
137132

138133
* You cannot join an 8.0 node to a PXC 8.4 cluster.
139134

140135
* You cannot join an 8.4 node to clusters older than 8.0.
141136

142-
Therefore, if you are running a version older than 8.0, first upgrade all nodes to the latest 8.0 (using any procedure described), then upgrade to 8.4.
137+
If you run a version older than 8.0, first upgrade all nodes to the latest 8.0 release, then upgrade to 8.4.
143138

144139
## Upgrade an async replication replica node
145140

146-
If a given PXC node is an async replica of some other server, follow the procedure below:
141+
If a PXC node is an async replica of another server, follow this procedure:
147142

148-
1. Stop async replication
143+
1. Stop async replication.
149144

150-
2. Upgrade PXC node using any described method
145+
2. Upgrade the PXC node using any described method.
151146

152-
3. Start async replication
147+
3. Start async replication.
153148

154-
4. Ensure async replication works
149+
4. Verify async replication works.
155150

156151
## Minor upgrade
157152

158-
A minor upgrade for Percona XtraDB Cluster 8.4 means upgrading to a newer version within the 8.4 series. For example, moving from version 8.4.0 to 8.4.1. These upgrades include bug fixes and small improvements but don't change major functionality.
153+
A minor upgrade moves Percona XtraDB Cluster 8.4 to a newer version within the 8.4 series (for example, from 8.4.0 to 8.4.1). These upgrades include bug fixes and minor improvements without major functionality changes.
159154

160155
To upgrade the cluster, follow these steps for each node:
161156

162-
1. Make sure that all nodes are synchronized.
157+
1. Verify all nodes are synchronized.
163158

164-
2. Stop the mysql service:
159+
2. Disable fast shutdown to ensure all data files are fully prepared before the upgrade:
165160

166-
```shell
167-
sudo service mysql stop
161+
```{.bash data-prompt="$"}
162+
$ mysql -u root -p -e "SET GLOBAL innodb_fast_shutdown=0;"
168163
```
169164

170-
3. Upgrade Percona XtraDB Cluster packages. For more information, see [Install Percona XtraDB Cluster](install-index.md).
165+
3. Stop the `mysql` service:
171166

172-
4. Back up `grastate.dat`, so that you can restore it if it is corrupted or zeroed out due to network issues.
167+
```{.bash data-prompt="$"}
168+
$ sudo service mysql stop
169+
```
173170

174-
5. Start the Percona XtraDB Cluster node with the new packages.
171+
4. Upgrade Percona XtraDB Cluster packages. For more information, see [Install Percona XtraDB Cluster](install-index.md).
175172

176-
In most cases, starting the `mysql` service should run the node with your
177-
previous configuration. For more information, see [Adding Nodes to Cluster](add-node.md#add-nodes-to-cluster).
173+
5. With the server stopped, run the following command to fetch the UUID and sequence number. Store these values to restore the `grastate.dat` file if corruption or network issues occur:
178174

179-
```shell
180-
sudo service mysql start
175+
```{.bash data-prompt="$"}
176+
$ mysqld --wsrep_recover --user=mysql --log-error=/tmp/wsrep-recover.log
181177
```
182178

183-
On Red Hat Enterprise Linux, the `/etc/my.cnf` configuration file is renamed to `my.cnf.rpmsave`. Make sure to rename this file back to the original name before joining the upgraded node back to the cluster.
179+
6. Start the Percona XtraDB Cluster node with the new packages.
180+
181+
Starting the `mysql` service runs the node with your previous configuration. For more information, see [Adding Nodes to Cluster](add-node.md#add-nodes-to-cluster).
184182

185-
The node automatically upgrades its data directory.
183+
```{.bash data-prompt="$"}
184+
$ sudo service mysql start
185+
```
186+
187+
On Red Hat Enterprise Linux, the `/etc/my.cnf` configuration file is renamed to `my.cnf.rpmsave`. Rename this file back to the original name before joining the upgraded node to the cluster.
186188

187-
This upgrade happens in one of two ways:
189+
The node automatically upgrades the data directory. This upgrade happens in one of two ways:
188190

189191
* During the node startup process
190192

191-
* Through a state transfer (either IST or SST) from another node
193+
* Through a state transfer (Incremental State Transfer (IST) or SST) from another node
192194

193-
The cluster handles the upgrade process automatically - you need to start the node with the new packages installed, and PXC manages the data directory upgrade process.
195+
The cluster handles the upgrade process automatically. Start the node with the new packages installed, and PXC manages the data directory upgrade.
194196

195-
6. Repeat this procedure for the next node in the cluster until you upgrade all nodes.
197+
7. Repeat this procedure for the next node in the cluster until all nodes are upgraded.
196198

197199
## Downgrade
198200

199-
Starting from version 8.0.34, MySQL-compatible database servers allow downgrades within the same Long-Term Support (LTS) version scope, provided the server has not applied any new server functionality to the data. While downgrading a node is not recommended, administrators can perform the downgrade using the established procedure.
200-
The key constraint is maintaining data compatibility. New features introduced in a specific point release cannot be retroactively applied to an earlier version. Administrators must carefully verify that no version-specific modifications have been made before attempting a downgrade.
201+
MySQL-compatible database servers (version 8.0.34 and later) allow downgrades within the same Long-Term Support (LTS) version scope. The server must not have applied any new functionality to the data. Downgrading a node is not recommended, but administrators can perform the downgrade using the established procedure.
202+
203+
The key constraint is data compatibility. New features introduced in a specific point release cannot be retroactively applied to an earlier version. Verify that no version-specific modifications have been made before attempting a downgrade.
201204

202-
While possible, downgrades carry inherent risks and should be approached with caution and thorough planning.
205+
Downgrades carry inherent risks. Approach downgrades with caution and thorough planning.

0 commit comments

Comments
 (0)