← Back to team overview

maria-developers team mailing list archive

Re: MariaDB GTID first impression

 

On Tue, May 7, 2013 at 3:52 AM, Kristian Nielsen
<knielsen@xxxxxxxxxxxxxxx> wrote:
>> written by the slaves, and thus the name matches, but I wonder if the master
>> should write this table (or a similar one) to keep track of its progress in
>
> Right. Actually, I've carefully avoided writing the table on the master, to
> avoid introducing extra overhead.

Kristian,

I was thinking about your words above and they make me wonder: if we
have a master and it doesn't write its current state into
rpl_slave_state, then we shut down the master, and while it's out we
failover to another server. Then the first server comes back and
should start to replicate from the new master. But how will it know
which GTID to start from if it doesn't have any state in
rpl_slave_state?
I can guess that with a graceful shutdown there's also file
<log-bin>.state which seem to contain the last state of the binlog.
BTW, can you tell more about this file, how it participates in the
replication? Will it be used to restore gtid_pos after shutdown?
But anyway that file seem to be written only at shutdown so in case
when mysqld crashes both rpl_slave_state and <log-bin>.state won't
exist. Will MariaDB restore its gtid_pos by scanning binlogs?

Another question I have: I see with multiple domains gtid_pos is not
sorted by domain id. I would guess it's sorted by the order of last
transactions in each domain. Is this a deliberate decision to make it
like that? Can it be sorted by domain id to be more predictable? I
mean if gtid_pos is not sorted with multiple domains it won't be
enough to compare values of gtid_pos on different servers to
understand whether they have the same transactions...

Thank you,
Pavel


Follow ups

References