0

I have been experimenting with mysql innodb cluster. One of the errors i've come across I don't know how to remedy or why exactly it causes a permanent death to any slave that wishes to catch up to the master - let me explain.

Create 3 instances of mysql. Use the innodb cluster utility to combine them into a cluster. You can use the AdminAPI to make sure the cluster is good. (use Single Primary mode so only 1 writer)

In the master mysql use mysql.exe to restore a dump of any table that has sql_log_bin = 0;

You'll notice that this causes that table not to replicate to the other database instances. Now if you drop the table the other slaves die and can never be caught up to the master.

You can even create mysql instance from scratch and point it to the master and it will never catch up. It will say recovering and then it will fail.

How do you repair in the case of this scenario? And, what exactly is going on that a slave even from scratch can't be synced after you do this?

2
  • restore a dump of any table that has sql_log_bin = 0; You'll notice that this causes that table not to replicate to the other database instances. Can you elaborate on why you would do this at all? It seems like you're creating a situation with a master that lacks all the transactions necessary to justify its current state -- the master is internally inconsistent with itself. Commented Jun 29, 2019 at 15:59
  • Well, by default the mysqldump and mysqlpump tools force you to use the purgegtid command. If you accidentally use the wrong switch, then the dump file can break replication completely. If this happens, how can you repair the cluster or do you have to reinstatiate a new cluster?
    – Watson
    Commented Jun 29, 2019 at 18:18

1 Answer 1

1

The issue is that you have this blob of data that was no way of being replicated. When you put it on the master and it set the gtid purged variable it basically says: I have this data, but I can't give it to you.

What you can do here is to use this dump to provision the slave/secondaries servers. So you can execute this update in the master, but when you add a new member before it joins you must also execute the dump there. Then they both can say: we have this lump of data we cannot replicate so we are in sync. Then the joiner can fetch whatever it is missing from the primary .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.