Skip to content

(8.4) PXC-4709: User is wrongly replicated to other nodes causing inconsistencies - #2160

Merged
kamil-holubicki merged 1 commit into
percona:8.4from
kamil-holubicki:PXC-4709-8.4
Sep 23, 2025
Merged

(8.4) PXC-4709: User is wrongly replicated to other nodes causing inconsistencies#2160
kamil-holubicki merged 1 commit into
percona:8.4from
kamil-holubicki:PXC-4709-8.4

Conversation

@kamil-holubicki

Copy link
Copy Markdown
Contributor

https://perconadev.atlassian.net/browse/PXC-4709

Problem:
Node is evicted from the cluster by inconsistency voting protocol. It happens when CREATE/ALTER USER is executed by the user without AUTHENTICATION_POLICY_ADMIN privilege.

Cause:
TOI is replicated before actual execution. On source node it fails, but on replicated node, it is executed by wsrep_applier thread working in root user context, so it doesn't fail remotely. It kicks-in inconsistency voting protocol which evicts the node from the cluster.

Solution:
On the Source side validate CREATE/ALTER USER against authentication policy before replicating. However, continue the normal flow, but skip TOI if validation fails.
This is to keep original errors/warnings generated (and used for inconsistency voting). Eg. In case of policy violation and nonexistent plugin happening on the same time, we want ER_PLUGIN_IS_NOT_LOADED to be reported as the original flow does.

…encies

https://perconadev.atlassian.net/browse/PXC-4709

Problem:
Node is evicted from the cluster by inconsistency voting protocol.
It happens when CREATE/ALTER USER is executed by the user without
AUTHENTICATION_POLICY_ADMIN privilege.

Cause:
TOI is replicated before actual execution. On source node it fails, but
on replicated node, it is executed by wsrep_applier thread working in
root user context, so it doesn't fail remotely. It kicks-in
inconsistency voting protocol which evicts the node from the cluster.

Solution:
On the Source side validate CREATE/ALTER USER against authentication
policy before replicating. However, continue the normal flow, but skip
TOI if validation fails.
This is to keep original errors/warnings generated (and used
for inconsistency voting). Eg. In case of policy violation and
nonexistent plugin happening on the same time, we want
ER_PLUGIN_IS_NOT_LOADED to be reported as the original flow does.
@kamil-holubicki

Copy link
Copy Markdown
Contributor Author

@dlenev dlenev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8.4 version of commit looks OK to me.

@kamil-holubicki
kamil-holubicki merged commit 9e36d80 into percona:8.4 Sep 23, 2025
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants