← Back to team overview

maria-developers team mailing list archive

Re: Documentation about GTID

 

On Fri, May 3, 2013 at 7:45 AM, Kristian Nielsen
<knielsen@xxxxxxxxxxxxxxx> wrote:
> Maybe the deeper issue is that you would prefer a design where sequence number
> is assumed unique by itself (or (domain_id, sequence_number) if using
> multi-source). And the code is allowed to silently break if this assumption is
> violated by user?
>
> This makes a lot of things simpler, of course. I did think a lot about this,
> and in the end I decided against it, because of numerous cases where this
> could make things harder for users that are perhaps not intimately aware with
> how GTID works. I am still hopeful that the current design can give the best
> of both worlds: something that "just works" in most cases for most users, and
> still provides what is needed for advanced users that can be expected to know
> what they are doing.

Now that you mentioned this I'm worried. Tell me please what will
happen with MariaDB in the following situation. Let's say we have
slave fully synced with master, the last GTID in binlogs (and I guess
the value of @@global.gtid_pos) is 0-1-100. Now let's say there's a
bug that didn't configure slave read-only, or for whatever other
unwanted reason slave got disconnected from master and someone
connected to slave and executed a binlogged transaction there. I guess
it will be assigned GTID 0-2-101 (or it will be 1-2-1?). If someone
checks value of @@global.gtid_pos at this point he will be able to
notice the discrepancy between master and slave. But it seems what you
are saying is if after that slave connects back to master he will be
able to successfully replicate and will execute transactions 0-1-101,
0-1-102 etc. Slave will still carry information in the binlog about
existence of transaction 0-2-101 but no one will be able to detect
that from outside of mysql. And if later this slave becomes a master
then it will push this extra transaction to all other servers. But if
the binlog file with this transaction will be already purged by the
time the slave becomes master then replication will be broken and no
one will be able to connect to it as slave.

Do I understand the situation correctly? Is this "works as intended"?


Thank you,
Pavel


Follow ups

References