Re: [Maria-developers] Review of patch for MDEV-4820
Vilho Raatikka <vilho.raatikka@skysql.com> writes:
What exactly does it require for the user to enable strict or 'relaxed' (=disasterous imho) mode?
Technically, one needs to SET GLOBAL gtid_strict_mode=1 with root privileges (config file option works as well of course). That's it. The practical issue is that old-style MariaDB/MySQL replication allows a number of "disasterous" uses. One example is a multi-master ring A->B->C->A, writing to all masters simultaneously. In such setup, it is fundamentally impossible to automatically eg. move a slave S from A->S to B->S - there is just not enough information about what events have been applied to S from A, B, and C. GTID introduces a way to configure this correctly (replication domains), but if we were to give an error by default then we would break upgrades from 5.5. So instead we provide gtid strict mode, so that once users understand what the "disasterous" uses are and how to avoid them, they can enable strict mode and get saner semantics. BTW, for the normal non-advanced user, I think silly stuff like running random manual transactions on slaves that get into the binlog is a far more common mistake. Gtid strict mode will cause errors on this, so it needs to be explictly enabled by users to not break/confuse upgrades.
Is it possible at any point in server's life cycle to check which mode it is running?
SHOW VARIABLES or SELECT @@GLOBAL.gtid_strict_mode will show the current value. But there is no way to check if it was enabled eg. two weeks ago, if that is what you are asking (the value is not stored in the binlog).
Can that setting be modified during runtime or only prior startup?
It can be changed at any time, though I think you need to STOP SLAVE/START SLAVE to get the change to take effect on a slave. - Kristian.
Kristian Nielsen <knielsen@knielsen-hq.org> writes:
BTW, for the normal non-advanced user, I think silly stuff like running random manual transactions on slaves that get into the binlog is a far more common mistake. Gtid strict mode will cause errors on this, so it needs to be explictly enabled by users to not break/confuse upgrades.
BTW2, those of us discussing here are all experts in databases and replication. Not so the average user, very far from it. I invite you to hang around in #mysql on IRC FreeNode for a few weeks and try to help people who come there asking questions. I have seen stuff like some admin of a MySQL server that had to ask how to open a text file like my.cnf! Those users will not be helped by talk of "alternate futures" and stuff like that. I want those users to also be able to use GTID (for the crash-safe slave eg). _And_ I want world-class datacenter operations to use GTID and work well also. Never doubt this. Doing both sometimes requires thinking out of the box. - Kristian.
participants (1)
-
Kristian Nielsen