[MDEV-15722] database restoration from mysqldump is not replicated(?) Created: 2018-03-29  Updated: 2020-01-06  Resolved: 2020-01-06

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.1.31
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: none now Assignee: Stepan Patryshev (Inactive)
Resolution: Incomplete Votes: 0
Labels: need_feedback
Environment:

Centos 7.4



 Description   

hi

I backup a database like this:
$ mysqldump ... --opt --create-options --gtid --log-queries
I've also tried other options, then I do "regular"
$ mysql db < db.sql
and this does replicate across the cluster. Tables are there, and columns but no records.

This should get replicated, right?



 Comments   
Comment by Elena Stepanova [ 2018-04-02 ]

What kind of "cluster" do you have? Is it a Galera cluster or the regular replication?

Comment by none now [ 2018-04-03 ]

I believe I have a "regular" galera.
..
[galera]

  1. Mandatory settings
    wsrep_on=ON
    wsrep_provider = /usr/lib64/galera/libgalera_smm.so
    wsrep_cluster_name = "ccnr-maria-cluster"
    wsrep_cluster_address = "gcomm://10.5.6.32,10.5.6.100"
    #wsrep_cluster_address = "gcomm://10.5.6.17,10.5.6.32,10.5.6.100,...?pc.wait_prim=no"
    wsrep_node_address = "10.5.6.49"
    wsrep_node_name = "whale"
    wsrep_sst_method = rsync
    log-bin = mariadb.binlog
    binlog_format = row
    default_storage_engine = InnoDB
    innodb_autoinc_lock_mode = 2
    wsrep-log-conflicts
    wsrep-debug
    ..

regards.

Comment by none now [ 2018-04-03 ]

to be bit more specific, on the node on which I execute:
$ mysql < db db.sql
database creation/restoration is complete, but other two nodes get tables, columns but no records.
I go on a different node to exec mysql < and the same happens.

Comment by none now [ 2018-04-14 ]

hi guys,
would you have any workarounds that one could try before you offer an "official" fix?
many thanks, L.

Comment by none now [ 2018-05-01 ]

hi folks, would you have some update?
I do see that statements, for a database created that way: $ mysql < db db.sql are NOT replicated even with:
> update wp_options set some=some where some=is-some
as if replication does not care about such a database.

Comment by none now [ 2018-05-11 ]

hi,
this must be some special case mysql cannot handle. I tried another database and there everything seems to be replicating okey.
It's not that I tried, tested ten different databases but the one that is not working, not replicating is wordpress database.
Is there something I can do to troubleshoot it, provide more info?
Can you test wordpress db?

How could it be that one/some db is not replicating while others are fine?

Comment by none now [ 2018-05-17 ]

Just an update - for that wordpress db, in wordpress I used "reset db plugin" and I reset just one table: options and... ! Replications re-started immediately.
Is that not even bigger mystery? How could some data in one table stop MariaDB replication from doing that one database?

Comment by Jan Lindström (Inactive) [ 2019-12-04 ]

Can you provide step by step instructions how to repeat. We would need contents of db.sql and can you provide output where we can see that data is not replicated (I hope you have verified that tables are InnoDB-tables) and error log from all nodes.

Comment by Stepan Patryshev (Inactive) [ 2019-12-04 ]

I have tried to reproduce it on 10.1.31-MariaDB-debug Source distribution (aba15b864af664276261dcbbdaef35268d407af1) with Galera 25.3.22(r3787) (7715c28895faa892b5201059a904e581edc106b2) with the same commands and options as mentioned here above. I used a cluster of three nodes made by:

./mtr --suite=galera_3nodes --start-and-exit --mysqld=--wsrep-debug --mysqld=--wsrep_cluster_name="ccnr-maria-cluster"

Created DB with three such tables:

CREATE TABLE `t1` (
  `i` int(11) NOT NULL AUTO_INCREMENT,
  `j` int(11) DEFAULT NULL,
  `k` int(11) DEFAULT NULL,
  PRIMARY KEY (`i`)
) ENGINE=InnoDB AUTO_INCREMENT=61306 DEFAULT CHARSET=latin1 

Filled it with 30K rows each and restored backup successfully replicated.
It needs more info. At least "show create" for all the tables from the db and Galera lib version.

Generated at Thu Feb 08 08:23:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.