Bug #98473 | group replication will be block after lock table | ||
---|---|---|---|
Submitted: | 4 Feb 2020 4:18 | Modified: | 2 Mar 2020 10:18 |
Reporter: | phoenix Zhang (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Group Replication | Severity: | S3 (Non-critical) |
Version: | 8.0.18 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | group replication |
[4 Feb 2020 4:18]
phoenix Zhang
[26 Feb 2020 5:10]
MySQL Verification Team
Hi, Thank you for the report. This does look like a bug. all best Bogdan
[28 Feb 2020 11:22]
Nuno Carvalho
Posted by developer: Hi, Thank you for the bug report, can you please add your servers configuration? Best regards, Nuno Carvalho
[1 Mar 2020 22:31]
MySQL Verification Team
Hi Zhang, Do you have "enforce-gtid-consistency" in your config? thanks Bogdan
[2 Mar 2020 0:44]
phoenix Zhang
This is the config file of port of 13000
Attachment: my13000.cnf (application/octet-stream, text), 1.04 KiB.
[2 Mar 2020 0:44]
phoenix Zhang
This is the config file of port of 13001
Attachment: my13001.cnf (application/octet-stream, text), 1.04 KiB.
[2 Mar 2020 0:45]
phoenix Zhang
This is the config file of port of 13002
Attachment: my13002.cnf (application/octet-stream, text), 1.04 KiB.
[2 Mar 2020 10:18]
Nuno Carvalho
Posted by developer: Hi Zhang, You have group_replication_consistency= BEFORE_AND_AFTER on your configuration. Thence the observed behaviour is the expected one. When you execute: server1: insert into t1 values (1,1); server1: lock tables t1 write; server2: insert into t1 values (2,2); Apply on server1 will be blocked by the LOCK TABLE. No other transaction can be committed until this one is complete. Otherwise we cannot guarantee "A RW transaction waits for 1) all preceding transactions to complete before being applied and 2) until its changes have been applied on other members." https://dev.mysql.com/doc/refman/8.0/en/group-replication-consistency-guarantees.html https://dev.mysql.com/doc/refman/8.0/en/group-replication-options.html#sysvar_group_replic... If you rely need to do the LOCK TABLE, then you should change the consistency guarantee to BEFORE, that way, only server1 will be impacted by it. BEFORE consistency only impacts the local server, it does not wait for others servers commit. Best regards, Nuno Carvalho