MySQL Forums
Forum List  »  Replication

Group replication 8.0 change primary
Posted by: chia wen chang
Date: July 19, 2019 03:23AM

HELLO

we test MYSQL GROUP REPLICATION 8.0 on a single box(VM)
use port 3306、3307、3308

Group replication use primary mode
3306 is primary

we use sysbench 1 table 100w data,32 thread testing
then MGR Primary 3306 port crash and change Primary to 3307 port

then we restart 3306 and join the group

this is status
mysql> select * from performance_schema.replication_group_members;
+---------------------------+--------------------------------------+----------------+-------------+--------------+-------------+----------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION |
+---------------------------+--------------------------------------+----------------+-------------+--------------+-------------+----------------+
| group_replication_applier | 0c523b04-9e41-11e9-b205-005056b24f36 | test1 | 3306 | RECOVERING | SECONDARY | 8.0.16 |
| group_replication_applier | 9be07697-9efe-11e9-8ab2-005056b24f36 | test1 | 3307 | ONLINE | PRIMARY | 8.0.16 |
| group_replication_applier | d1fd6698-9f06-11e9-be3b-005056b24f36 | test1 | 3308 | ONLINE | SECONDARY | 8.0.16 |
+---------------------------+--------------------------------------+----------------+-------------+--------------+-------------+----------------+

generally the 3307 is primary,it can insert data,but its got the error
mysql> insert into test values (3,'cc');
ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option so it cannot execute this statement

then we check performance_schema.replication_group_member_stats
we note the COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE numbere is decrement

then we wait the COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE return to zero
the primary 3307 can insert

but why ? is this normal phenomenon ?


thx

Options: ReplyQuote


Subject
Views
Written By
Posted
Group replication 8.0 change primary
608
July 19, 2019 03:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.