Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10.5 MDEV 34891 teemu #470

Open
wants to merge 6 commits into
base: 10.5
Choose a base branch
from
Open

10.5 MDEV 34891 teemu #470

wants to merge 6 commits into from

Conversation

temeo
Copy link

@temeo temeo commented Jan 7, 2025

  • MDEV-34891 : SST failure occurs when gtid_strict_mode is enabled
  • Add suppression for transaction deadlock error.
  • Add tests for wsrep GTID recovery with binlog on and off
  • Initialize gtid seqno from recovered seqno when bootstrapping a new cluster

@janlindstrom
Copy link

test_pr

janlindstrom and others added 6 commits January 20, 2025 14:46
Problem was that initial GTID was set on wsrep_before_prepare
out-of-order. In practice GTID was set to same as previous
executed transaction GTID. In recovery valid GTID was found
from prepared transaction and this transaction is committed
leadin to fac that same GTID was executed twice.

This is fixed by setting invalid GTID at wsrep_before_prepare
and later in wsrep_before_commit actual correct GTID is set
and this setting is done while we are in commit monitor i.e.
assigment is done in order of replication.

In recovery if prepared transaction is found we check its
GTID, if it is invalid transaction will be rolled back
and if it is valid it will be committed.

Added two test cases for both mariabackup and rsync SST methods
to show that GTIDs remain consistent on cluster and that
all expected rows are in the table.
@janlindstrom janlindstrom force-pushed the 10.5-MDEV-34891-teemu branch from 59619e8 to 37cb5d8 Compare January 20, 2025 12:48
loose-galera-sst-rsync-gtid=1

[mysqld.1]
wsrep_provider_options='[email protected].#galera_port;gcache.size=1;pc.weight=2;pc.ignore_sb=true'
Copy link
Author

Choose a reason for hiding this comment

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

Remove pc.ignore_sb, it is not needed when pc.weight=2. Copy EVS timeouts from top level galera_2nodes.cnf

Choose a reason for hiding this comment

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

Sure

server-id=10

[mysqld.2]
wsrep_provider_options='[email protected].#galera_port;gcache.size=1;pc.ignore_sb=true'
Copy link
Author

Choose a reason for hiding this comment

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

Remove pc.ignore_sb. Copy EVS timeouts from top level galera_2nodes.cnf.

Choose a reason for hiding this comment

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

Done

@@ -1,11 +1,11 @@
--echo Performing --wsrep-recover ...
if ($wsrep_recover_additional)
{
--exec $MYSQLD --defaults-group-suffix=.$galera_wsrep_recover_server_id --defaults-file=$MYSQLTEST_VARDIR/my.cnf --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.log --innodb --wsrep-recover $wsrep_recover_additional > $MYSQL_TMP_DIR/galera_wsrep_recover.log 2>&1
--exec $MYSQLD --defaults-group-suffix=.$galera_wsrep_recover_server_id --defaults-file=$MYSQLTEST_VARDIR/my.cnf --log-error=$MYSQL_TMP_DIR/galera_wsrep_recover.log --innodb --wsrep-debug=1 --wsrep-recover $wsrep_recover_additional > $MYSQL_TMP_DIR/galera_wsrep_recover.log 2>&1
Copy link
Author

Choose a reason for hiding this comment

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

Is it necessary to have --wsrep-debug here and below? Wsrep debug is quite verbose and increases log sizes significantly.

Choose a reason for hiding this comment

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

It was used to debug issue, I will remove it.

[mysqld]
wsrep_sst_method=mariabackup
wsrep_sst_auth="root:"
wsrep_debug=1
Copy link
Author

Choose a reason for hiding this comment

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

Is wsrep_debug=1 necessary here?

Choose a reason for hiding this comment

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

Removed

loose-galera-sst-mariabackup-gtid=1

[mysqld.1]
wsrep_provider_options='[email protected].#galera_port;gcache.size=1;pc.weight=2;pc.ignore_sb=true'
Copy link
Author

Choose a reason for hiding this comment

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

Remove pc.ignore_sb, it is not needed when pc.weight=2. Copy EVS timeouts from top level galera_2nodes.cnf

Choose a reason for hiding this comment

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

Done

server-id=10

[mysqld.2]
wsrep_provider_options='[email protected].#galera_port;gcache.size=1;pc.ignore_sb=true'
Copy link
Author

Choose a reason for hiding this comment

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

Remove pc.ignore_sb. Copy EVS timeouts from top level galera_2nodes.cnf.

Choose a reason for hiding this comment

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

Done

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