[MDEV-12648] Galera: replicate-do-db and replicate-ignore-db filters not honored at all Created: 2017-04-30  Updated: 2020-11-19  Resolved: 2020-11-19

Status: Closed
Project: MariaDB Server
Component/s: Galera, Replication
Affects Version/s: 10.1.22, 10.0.30-galera
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Richard Cox Assignee: Jan Lindström (Inactive)
Resolution: Not a Bug Votes: 1
Labels: None
Environment:

OS: Linux (Debian Jessie)



 Description   

I have a Galera cluster with 3 nodes, all configured like so (only differing in wsrep_node_address and wsrep_node_name):

[galera]
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_cluster_name="test_cluster"
wsrep_cluster_address="gcomm://172.17.0.2,172.17.0.3,172.17.0.4"
wsrep_sst_method=rsync
wsrep_node_address="172.17.0.2"
wsrep_node_name="master1-node"
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0
 
[mysqld]
replicate-do-db=replicated_db

While replication appears to work fine, the replicate-do-db and replicate-ignore-db filters are not honored at all. According to https://mariadb.com/kb/en/mariadb/mariadb-galera-cluster-known-limitations/, they should.



 Comments   
Comment by Daniel Black [ 2017-05-05 ]

Keep in mind replication filters affect the default database. DML that are explicitly change a non-default database aren't affected by replication filters.

It would help to show what operations/results you expecting and what engine type.

Comment by Richard Cox [ 2017-05-06 ]

@Daniel Black:

On one of the nodes, I call:

CREATE DATABASE norepl; # Created on all nodes, which is OK.
 
USE norepl; # Switch default database to norepl. Keep in mind replicate-do-db=replicated_db.
CREATE TABLE tbl(...) ENGINE=InnoDB; # Should be filtered, but is not.
INSERT INTO tbl(...) VALUES(...); # Should be filtered, but is not.

Comment by Nischith Shetty [ 2018-07-23 ]

Came across this problem.This should be listed in the mariadb galera limitations page as it says otherwise.

Comment by Jan Lindström (Inactive) [ 2020-11-19 ]

This parameter does work only for asynchronous replication e.g. when Galera cluster is master or slave of asynchronous replication.

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