pxc_strict_mode does not detect version mismatch
Description
Environment
AFFECTED CS IDs
relates to
Activity

Kamil Holubicki March 14, 2023 at 8:36 AM
Server part fix
Waiting for release-8.0.31 -> 8.0 merge to create PR.

Andrew Garner February 28, 2023 at 3:52 PM
The initial mixed-version-node-is-writable problem seems related to initialization. PXC 8.0 initializes wsrep_protocol_version = wsrep_max_protocol_version
. When a node joins a cluster, there seems to be some assumption that the view and wsrep_protocol_version
will be initialized via SST. This doesn't work when upgrading from 5.7 to 8.0, so wsrep_protocol_version
remains at 4
even in a mixed-mode cluster effectively disabling the pxc-strict-mode
check.
The wsrep_protocol_version
does get updated later in a rolling upgrade once a new cluster view is formed. E.g. when the second node exits the cluster and a new view is formed, then wsrep_protocol_version
downgrades back to 3 and pxc-strict-mode
starts being enforced.
However, even if a node manages to enforce pxc_strict_mode
initially, when the node state is Donor/Desynced
(or any not-synced state) this check is disabled again.
This seems to be a defect in the block_write_while_in_rolling_upgrade implementation which disables the check if the node isn't strictly in the "synced" state:

yoann.lacancellera February 28, 2023 at 9:49 AM
Could relate to

yoann.lacancellera February 28, 2023 at 9:45 AMEdited
Can not reproduced if you restart mysql 8.0 after its initial SST and upgrade.

yoann.lacancellera February 28, 2023 at 9:40 AM
In case you do not reproduce, simply set up a 3 nodes cluster with 2 5.7 and 1 8.0 node.
It can be repeated by removing the 8.0 datadir to force SST.
Details
Assignee
Kamil HolubickiKamil HolubickiReporter
yoann.lacancellerayoann.lacancelleraNeeds Review
YesNeeds QA
YesFix versions
Affects versions
Priority
Medium
Details
Details
Assignee

Reporter

Needs Review
Needs QA
Fix versions
Affects versions
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist
Open Smart Checklist
Smart Checklist

How to reproduce
It's documented that it should check major version:
https://docs.percona.com/percona-xtradb-cluster/5.7/features/pxc-strict-mode.html#major-version-check
On a 5.7 node
On 8.0 node again:
Other nodes will then crash: