Skip to content

PXC-4683: Node leaves the cluster after an error in a stored procedure#309

Merged
jaideepkarande merged 1 commit intopercona:4.x-8.0from
jaideepkarande:PXC-4683-8.0
Mar 31, 2026
Merged

PXC-4683: Node leaves the cluster after an error in a stored procedure#309
jaideepkarande merged 1 commit intopercona:4.x-8.0from
jaideepkarande:PXC-4683-8.0

Conversation

@jaideepkarande
Copy link
Copy Markdown

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

Problem: ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT(1681) warning causes inconsistency.
TOI-failed inside a stored procedure e.g. ALTER TABLE on a non-existing table with tinyint marked the node inconsistent due to additional 1681 warning.

Description:
TOI failure in a stored procedure (e.g. ALTER TABLE on non-existing table with tinyint) could mark the node inconsistent. The voting payload included warning 1681 (Integer display width is deprecated..) in addition to the error 1146. Warning 1681 was logged in client side while 1681 warning was not being logged via replication channels. The difference in error and warnings in different nodes caused inconsistency causing one of the node i.e. recipient of transaction to leave the cluster.

Cause:
The Galera wsrep_store_error consider the diagnostics area in addition to the real error code. Deprecated integer display width (tinyint(1) -> warning 1681), nodes produce different condition lists (1146 vs 1146+1681), leading to different vote and eventually causing inconsistency.

Fix:
Ignore the ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT and do not send it across cluster.

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

Problem: ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT(1681) warning causes
inconsistency.
TOI-failed inside a stored procedure e.g. ALTER TABLE on a non-existing table
with tinyint marked the node inconsistent due to additional 1681 warning.

Description:
TOI failure in a stored procedure (e.g. ALTER TABLE on non-existing table with
tinyint) could mark the node inconsistent. The voting payload included warning
1681 (Integer display width is deprecated..) in addition to the error 1146.
Warning 1681 was logged in client side while 1681 warning was not being
logged via replication channels. The difference in error and warnings in
different nodes caused inconsistency causing one of the node i.e.
recipient of transaction to leave the cluster.

Cause:
The Galera wsrep_store_error consider the diagnostics area in addition to the
real error code. Deprecated integer display width (tinyint(1) -> warning 1681),
nodes produce different condition lists (1146 vs 1146+1681), leading to
different vote and eventually causing inconsistency.

Fix:
Ignore the ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT and do not send it across
cluster.
@kamil-holubicki
Copy link
Copy Markdown

What about the idea discussed on Slack that we could move towards vote calculation basing only on error codes (no warnings)? Do you see any drawbacks of that solution?

@jaideepkarande jaideepkarande merged commit d4541bd into percona:4.x-8.0 Mar 31, 2026
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