[MDEV-6593] domain_id based replication filters Created: 2014-08-16  Updated: 2015-12-30  Resolved: 2014-12-04

Status: Closed
Project: MariaDB Server
Component/s: Replication
Fix Version/s: 10.1.2

Type: Task Priority: Major
Reporter: Nirbhay Choubey (Inactive) Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 1
Labels: galera, gtid, replication

Issue Links:
Blocks
blocks MDEV-6594 Use separate domain_id for Galera tra... Closed
PartOf
is part of MDEV-9345 Replication to enable filtering on ma... Open

 Description   

Provide a mechanism to filter replication events on the slave replication
server based on domain_id.

New master definitions:

(1) DO_DOMAIN_IDS = (N[,N])

  • Accepts a comma-separated list of domain_ids, the replication events of
    which will be kept.
  • If a CHANGE MASTER command is executed without DO_DOMAIN_IDS, the
    existing list of domain ids (if any) would be preserved.
  • DO_DOMAIN_IDS=() can be used to clear the list.
  • The list should show in SHOW MASTER STATUS output and master_info file.
  • On restart, the list should automatically get populated from master_info.

(2) IGNORE_DOMAIN_IDS = (N[,N])

  • Accepts a comma-separated list of domain_ids, the replication events of
    which will be filtered out.
  • If a CHANGE MASTER command is executed without IGNORE_DOMAIN_IDS, the
    existing list of domain ids (if any) would be preserved.
  • IGNORE_DOMAIN_IDS=() can be used to clear the list.
  • The list should show in SHOW MASTER STATUS output and master_info file.
  • On restart, the list should automatically get populated from master_info.

Additional notes:

  • The list preservation rule is consistent with IGNORE_SERVER_IDS.
  • Both the lists (DO_ & IGNORE_) cannot be non-empty at the same time.
  • CHANGE MASTER TO command would fail with ER_MASTER_INFO if it tries
    to set both the lists.

Examples:

CHANGE MASTER TO .. IGNORE_DOMAIN_IDS= (1,2,3) .. ;
CHANGE MASTER TO .. DO_DOMAIN_IDS= (99) .. ;
CHANGE MASTER TO .. DO_DOMAIN_IDS= () .. ;

$ tail -2 master.info
do_domain_ids=0
ignore_domain_ids=3 1 2 3



 Comments   
Comment by Kristian Nielsen [ 2014-08-16 ]

It might be better to do it like ignored server ids. Eg.

CHANGE MASTER TO IGNORE_DOMAIN_IDS= (1,2)
CHANGE MASTER TO ONLY_DOMAIN_IDS= (0)

This way, it is possible to configure it per master connection, which would seem to be useful.

Comment by Nirbhay Choubey (Inactive) [ 2014-09-05 ]

Hi Kristian,
Thanks for the suggestion. I have updated the description accordingly.

Comment by Nirbhay Choubey (Inactive) [ 2014-09-12 ]

http://lists.askmonty.org/pipermail/commits/2014-September/006553.html

Comment by Kristian Nielsen [ 2014-09-16 ]

https://lists.launchpad.net/maria-developers/msg07703.html
https://lists.launchpad.net/maria-developers/msg07704.html

Comment by Nirbhay Choubey (Inactive) [ 2014-11-07 ]

http://lists.askmonty.org/pipermail/commits/2014-November/006904.html

Comment by Kristian Nielsen [ 2014-11-14 ]

Review sent on maria-developers@:

https://lists.launchpad.net/maria-developers/msg07895.html

Comment by Nirbhay Choubey (Inactive) [ 2014-11-18 ]

http://lists.askmonty.org/pipermail/commits/2014-November/007040.html

Comment by Nirbhay Choubey (Inactive) [ 2014-12-04 ]

https://github.com/MariaDB/server/commit/a50ddebb5cfa7b79540d155e8e41c7a07c4c3fbf

Generated at Thu Feb 08 07:13:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.