← Back to team overview

maria-developers team mailing list archive

Re: Documentation about GTID

 

Alex Yurchenko <alexey.yurchenko@xxxxxxxxxxxxx> writes:

> From the documentation the purpose of domain ID in GTID is quite
> clear. But what is the role of server ID?

The role is mainly to ensure uniqueness of GTID when domain_id is not
configured correctly.

Replication already requires server ID to be unique, so (server_id, sequence
number) will be globally unique as long as sequence number is increased
locally on each server.

Domain id is not required to be unique, in fact it will typically be shared by
master and slave. It is a common mistake to do a manual transaction on the
slave while transactions are also being done at the same time on the
master. Having server_id in the GTID prevents that two different transactions
end up with the same GTID.

 - Kristian.


Follow ups

References