PXC-4683: Node leaves the cluster after an error in a stored procedure#309
Merged
jaideepkarande merged 1 commit intopercona:4.x-8.0from Mar 31, 2026
Merged
Conversation
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.
bf2c73c to
afb308f
Compare
|
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? |
kamil-holubicki
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.