[MDEV-31690] Enhance replication for catalogs Created: 2023-07-15  Updated: 2023-12-22

Status: Open
Project: MariaDB Server
Component/s: Replication
Fix Version/s: 11.5

Type: Task Priority: Major
Reporter: Michael Widenius Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-31542 Add multi-tenancy catalogs to MariaDB Stalled

 Description   

When using catalogs, only the 'def' users can start/stop/setup replication.

We should support the following replication setups:

  • Replication from non-catalog server to one catalog in a catalog-server.
  • Replication from one catalog server to another (assuming both servers have the same catalogs).
  • Replication from a catalog to a non-catalog server.

To be able to do the above should add the following options to CHANGE MASTER:

  • SLAVE_CATALOG=catalog_name
    Used when replicate from a non-catalog server to specific catalog in a catalog server.
    When writing the binary log on the slave, we should replace the catalog name
    with 'catalog_name'.
  • MASTER_CATALOG=catalog_name
    Used when replication from a catalog to a non-catalog server.
    When writing the binary log on the slave, we should replace the catalog name with 'def'.
    We also have to filter all binlog entries so that we only send entries related to a the
    MASTER_CATALOG to the slave.
  • We should also support PRIMARY_CATALOG and REPLICA_CATALOG as synonyms for the
    above.

We also needed to add tests for all of the above setup, in addition to other tests to verify that replication works with catalogs.

We should first code support for replication from non-catalog server -> catalog server and catalog-server -> catalog_server. Only later add support for catalog->server -> non-catalog server as this is likely to be much less used.


Generated at Thu Feb 08 10:25:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.