Phil Sweeney <launchpad@sweeneymail.com> writes:
Delayed replication (a feature shipped in MySQL 5.6) has been a MariaDB feature request since 2014, and has been listed as 'major/red' priority in
Can anyone comment on whether this is still likely to make it into 10.2.
I am planning to look into this. - Kristian.
Hi Kristian,
On 21 Sep 2016, at 16:26, Kristian Nielsen <knielsen@knielsen-hq.org> wrote:
Phil Sweeney <launchpad@sweeneymail.com> writes:
Delayed replication (a feature shipped in MySQL 5.6) has been a MariaDB feature request since 2014, and has been listed as 'major/red' priority in
Can anyone comment on whether this is still likely to make it into 10.2.
I am planning to look into this.
Thank you so much! This is one of the major compatibility pain points that haven’t been addressed since MySQL 5.6 has come to market. It also has practical use. -- Colin Charles, http://bytebot.net/blog/ twitter: @bytebot | skype: colincharles "First they ignore you, then they laugh at you, then they fight you, then you win." -- Mohandas Gandhi
Kristian Nielsen <knielsen@knielsen-hq.org> writes:
Delayed replication (a feature shipped in MySQL 5.6) has been a MariaDB
I am planning to look into this.
If anyone is interested, they can track my progress here: https://github.com/knielsen/server/commits/mdev7145 (The current tree has the base feature working (testcase passes), but there are still a handful of tasks to do). One issue that turns up is that the feature adds new columns to SHOW SLAVE STATUS: SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Meanwhile, MariaDB has already added other columns, such as Parallel_Mode. The question then is where in the column list to add the new columns. I propose to add the new columns at the end of the list output by SHOW SLAVE STATUS (but before any additional columns output by SHOW ALL SLAVES STATUS). This is consistent with how other new columns are added in MariaDB, and preserves the order of existing columns in SHOW SLAVE STATUS. A possible alternative is to add the new columns in the same relative positions to existing columns as done in MySQL 5.7. This might be seen as a way to be more compatible with MySQL; however, the reality is that there are additional columns in MySQL that are still not in MariaDB after this patch. So column indexes will still be off between MariaDB and MySQL. With the additional disadvantage that column indexes for existing columns will change, and may then change again if additional columns are later merged again. So I plan to go with the first approach. This has the benefit that applications upgrading will not see columns of SHOW SLAVE STATUS shift positions. Applications can still use the proper column names to be independent of exact column position. But let me know if there are other opinions, about column position or anything else about the patch. The tree is against 10.1 (but will eventually be pushed into 10.2, obviously). - Kristian.
Delayed replication (a feature shipped in MySQL 5.6) has been a MariaDB
I have now pushed this into 10.2. Ian, I have written some text for documentation below. Do you want to integrate this with the existing documentation? I'm thinking you have a better overview of what needs to be updated in other pages? Else, let me know if you want me to put it into the documentation myself, or if you need something more from me. I still have the 10.1-based tree on my github, if someone wants to test it out and 10.1 is more convenient than 10.2: https://github.com/knielsen/server/commits/mdev7145 - Kristian. ----------------------------------------------------------------------- Delayed replication Delayed replication allows to specify that a replication slave should lag behind the master by (at least) a specified amount of time. Before executing an event, the slave will first wait, if necessary, until the given time has passed since the event was created on the master. The result is that the slave will reflect the state of the master some time back in the past. Delayed replication is available starting from MariaDB 10.2.3. Delayed replication is enabled using the MASTER_DELAY option to CHANGE MASTER: CHANGE MASTER TO master_delay=3600; The delay is specified in seconds. A zero delay disables delayed replication. The slave must be stopped when changing the delay value. Three fields in SHOW SLAVE STATUS are associated with delayed replication: 1. SQL_Delay: This is the value specified by MASTER_DELAY in CHANGE MASTER (or 0 if none). 2. SQL_Remaining_Delay. When the slave is delaying the execution of an event due to MASTER_DELAY, this is the number of seconds of delay remaining before the event will be applied. Otherwise, the value is NULL. 3. Slave_SQL_Running_State. This shows the state of the SQL driver threads, same as in SHOW PROCESSLIST. When the slave is delaying the execution of an event due to MASTER_DELAY, this fields displays: "Waiting until MASTER_DELAY seconds after master executed event".
Thanks - I'm away until the 22nd, will add it the KB when I get back. On 16/10/2016 23:58, Kristian Nielsen wrote:
Delayed replication (a feature shipped in MySQL 5.6) has been a MariaDB
I have now pushed this into 10.2.
Ian, I have written some text for documentation below. Do you want to integrate this with the existing documentation? I'm thinking you have a better overview of what needs to be updated in other pages? Else, let me know if you want me to put it into the documentation myself, or if you need something more from me.
I still have the 10.1-based tree on my github, if someone wants to test it out and 10.1 is more convenient than 10.2:
https://github.com/knielsen/server/commits/mdev7145
- Kristian.
participants (3)
-
Colin Charles
-
Ian Gilfillan
-
Kristian Nielsen