[MDEV-22905] Support DO_DOMAIN_IDS and IGNORE_DOMAIN_IDS in replication handshake Created: 2020-06-16  Updated: 2023-09-07  Resolved: 2023-07-24

Status: Closed
Project: MariaDB Server
Component/s: Galera, Replication
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Richard Stracke Assignee: Jan Lindström
Resolution: Won't Do Votes: 0
Labels: Galera, gtid, replication

Issue Links:
Relates
relates to MDEV-20119 Implement the --do-domain-ids, --igno... Closed
relates to MDEV-20715 Implement system variable to disallow... Closed
relates to MXS-2580 Clarify requirements of binlog router... Closed
relates to MXS-2581 Support DO_DOMAIN_IDS and IGNORE_DOMA... Closed

 Description   

Description of DO_DOMAIN_IDS is

"The DO_DOMAIN_IDS option for CHANGE MASTER can be used to configure a replication slave to only apply binary log events if the transaction's GTID is in a specific gtid_domain_id value"

The filter works after the replication handshake, which is counter intuitive.

It would more consisten, if the replication handshake respect DO_DOMAIN_IDS and
IGNORE_DOMAIN_IDS.

One possible usecase is, if a async slave is a slave from a galera node. slave_pos is
(, <server only gtid>)
After an SST the <server only gtid> is not anymore in the binlog, but still the <any wsrep gtid> .

This breaks replication. Repecting DO_DOMAIN_IDS in replication handshake can help here.



 Comments   
Comment by Jan Lindström [ 2023-03-28 ]

I could see following use case for different domain_id's

node1 <--->node2<--->node3    (Galera cluster domain_id=1)     node4<--->node5<--->node6 (Galera cluster domain_id=2)
         |        (Async replication)                                                                   |    (Async replication)
node7<--->node8<--->node9     (Galera cluster domain_id=3)

Here I have 2 master Galera clusters and one replica Galera cluster. Even when lets say master Galera cluster with domain_id=1 goes down and we change master, I do not see reason to ignore some events from certain domain. Note that inside a cluster domain_id must be the same as documented and currently I do not see reason to change that.

If this feature is important to customer(s), please provide more detailed description on use case and how it should work. Current description is too vague for feature request. Therefore, I can't evaluate possible consequences and/or task estimates.

Comment by Richard Stracke [ 2023-06-07 ]

janlindstrom

You only mention here wsrep_gtid_domain in your setup.

The main purpose of this ticket is to ignore gtid_domain_id.

gtid_domain_id will be used, if a transaction was written to the node, which was not replicated to other nodes for different reasons.

Generated at Thu Feb 08 09:18:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.