Comments on: Online DDL with Group Replication In Percona Server for MySQL 8.0.22 (and MySQL 8.0.23) https://www.percona.com/blog/online-ddl-with-group-replication-in-percona-server-for-mysql-8-0-22/ Mon, 19 Apr 2021 17:51:16 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Marco Tusa https://www.percona.com/blog/online-ddl-with-group-replication-in-percona-server-for-mysql-8-0-22/#comment-10973146 Mon, 19 Apr 2021 17:51:16 +0000 https://www.percona.com/blog/?p=75486#comment-10973146 Correct.
Anyhow from the tests I did, the fastest secondary will become Primary. But then wait for the metalock given the remaining secondary is still processing.

]]>
By: Shlomi Noach https://www.percona.com/blog/online-ddl-with-group-replication-in-percona-server-for-mysql-8-0-22/#comment-10973145 Mon, 19 Apr 2021 17:07:48 +0000 https://www.percona.com/blog/?p=75486#comment-10973145 Thank you Marco! So, the system is leaderless for the duration of the ALTER on secondaries, because none of the secondaries would step up as primary, until all (both?) of them complete the ALTER, if I understand correctly. Meaning, if a 10 hour ALTER completes on the primary, the next 10 hours are an availability risk: if the primary goes down during those next 10 hours, the system is effectively read-only, again, if I understand correctly. Super interesting!

]]>
By: Marco (the Grinch) Tusa https://www.percona.com/blog/online-ddl-with-group-replication-in-percona-server-for-mysql-8-0-22/#comment-10973144 Mon, 19 Apr 2021 14:02:38 +0000 https://www.percona.com/blog/?p=75486#comment-10973144 Shlomi,

Results:

After Primary had complete the local operation the SECONDARY nodes start the alter.
– Write is on hold on Primary
– Kill primary
– SECONDARY NODES not able to elect Primary while applying the ALTER locally.
– Writes is still locked (NO PRimary elected)
– First SECONDARY complete the ALTER and BECOME PRIMARY, but remain locked by metalock
– Second Secondary complete ALTER
– Lock is raised
– Writes continue.

So we have still the lock but DATA inserted during the ONLINE segment on Primary is replicated correctly, then table is modified on SECONDARY nodes as expected and cluster continue without problems.

]]>
By: Marco (the Grinch) Tusa https://www.percona.com/blog/online-ddl-with-group-replication-in-percona-server-for-mysql-8-0-22/#comment-10973143 Mon, 19 Apr 2021 07:23:20 +0000 https://www.percona.com/blog/?p=75486#comment-10973143 Ivan, if you refer to the fact we do not get an error when specifically asking for “ALGORITHM=INPLACE, LOCK=NONE” then I agree. We should get a message saying the Onlne DDL cannot be executed following our request.
Said that the way DDL is processed (ONLINE on the primary) then LOCK has it’s own logic and is in a way better than TOI we have with Galera.
In any case I would love to have the ONLINE respected also on SECONDARY, but I will defer to Oracle about this.
Finally always keep in mind that to avoid this behaviour we can use PT-OSC (PT Online Schema CHange) as we have to do for incompatible changes. That will reduce the locking to a “moment” as usual.
Thanks for reading the blog

]]>
By: Marco https://www.percona.com/blog/online-ddl-with-group-replication-in-percona-server-for-mysql-8-0-22/#comment-10973142 Mon, 19 Apr 2021 07:14:49 +0000 https://www.percona.com/blog/?p=75486#comment-10973142 Interesting question, I will comeback to you later with an answer. Did not track that specific one.

]]>
By: Ivan Baldo https://www.percona.com/blog/online-ddl-with-group-replication-in-percona-server-for-mysql-8-0-22/#comment-10973141 Sun, 18 Apr 2021 15:47:29 +0000 https://www.percona.com/blog/?p=75486#comment-10973141 Thanks for sharing!
I respectfully disagree though, for me this is no doubt a bug.
It should at least be documented and a warning raised…
Hope it could be solved in the future, adding indexes is fairly common.

]]>
By: Shlomi Noach https://www.percona.com/blog/online-ddl-with-group-replication-in-percona-server-for-mysql-8-0-22/#comment-10973140 Sun, 18 Apr 2021 12:18:21 +0000 https://www.percona.com/blog/?p=75486#comment-10973140 Marco, thanks for this information! I’m curious: what happens if the migration completes on the PRIMARY, and one second later you kill the PRIMARY? Meaning, secondaries both began to run the replicated ALTER, but are blocking INSERTs. So, if you kill the PRIMARY, do all writes make it to the secondaries and will be eventually applied, or are INSERTs lost?

]]>