[MDEV-253] Multi-source replication Created: 2012-05-04 Updated: 2019-08-22 Resolved: 2012-11-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | 10.0.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Rasmus Johansson (Inactive) | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pf1 | ||
| Description |
|
This task is about implementing a way for a MariaDB replication slave to Each master is handled by a specific replicator instance in the slave A replicator instance is identified with a user-chosen name used in In order to remain backwards-compatible with existing third-party scripts In this worklog, there is no extra conflict resolution proposed. The effect of An easy and typical way to avoid conflicts would be to eg. to use separate See also MySQL WL#1697: http://forge.mysql.com/worklog/task.php?id=1697 High-Level SpecificationHere is a preliminary list of things that need to be changed/extended to File names These files used to store replication state must be extended to include the HOST-relay-bin.XXXXXX SQL statements These statements need to be extended to take an optional replicator instance CHANGE MASTER TO System variables These system variables need to handle multiple replicator instances. Some can SQL_SLAVE_SKIP_COUNTER The deprecated options master_host, master_port, master_user, master_password, Low-Level DesignA main part of this worklog will be to modify the server code so that all Another major part is to carefully develop the feature and not the least test |
| Comments |
| Comment by Elena Stepanova [ 2012-09-25 ] |
|
Trying bzr+ssh://bazaar.launchpad.net/~maria-captains/maria/10.0-mdev253 revno 3436. Here is the simplest test case (more of a template for future test cases). It contains cnf and test files now, we'll record a result file later when we're satisfied with the way it works.
[mysqld.1] [mysqld.2] [mysqld.3] [ENV]
eval change master 'slave1' to master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root'; query_vertical show full slave status; stop slave 'slave1'; query_vertical show slave 'slave1' status; |
| Comment by Elena Stepanova [ 2012-09-25 ] |
|
I observe some problems with how server executes this test case. 1. stop slave 'slave1'; command throws a warning: Warnings: However, both before and after the command slave status shows that the slave is running. Slave_IO_Running Yes 2. Slave produces memory-related errors: Error: Safemalloc overrun buffer mysys/safemalloc.c:303, mysys/safemalloc.c:325, ??:0, ??:0, sql/mysqld.cc:1758, sql/mysqld.cc:5022, sql/main.cc:26, ??:0 3. In show full slave status, it looks like connection_name and slave_IO_state are switched: Connection_name Checking master version |
| Comment by Elena Stepanova [ 2012-09-25 ] |
|
A couple times got the assertion failure: mysqld: /home/elenst/10.0-mdev253/mysys/mf_iocache.c:1287: _my_b_seq_read: Assertion `pos_in_file == info->end_of_file' failed. sporadic, no test case yet, will try to create it shortly. |
| Comment by Elena Stepanova [ 2012-09-25 ] |
|
Getting Error: Freeing overrun buffer mysys/safemalloc.c:179, mysys/my_malloc.c:116, sql/rpl_mi.cc:76, sql/rpl_mi.cc:84, sql/rpl_mi.cc:596, mysys/hash.c:605, sql/rpl_mi.cc:984, sql/sql_reload.cc:338 while executing muti_source.simple Server built as Error log excerpt: 120925 20:57:00 [Note] Master 'slave1': Slave I/O thread: connected to master 'root@127.0.0 |
| Comment by Elena Stepanova [ 2012-09-25 ] |
|
Slave_IO_state and Connection_name still seem to be switched in SHOW FULL SLAVE STATUS: show full slave status; revno 3436 |
| Comment by Elena Stepanova [ 2012-09-25 ] |
|
--sync_with_master 0, 'master1' doesn't work Upd: moved the description of the problem into |
| Comment by Elena Stepanova [ 2012-09-25 ] |
|
"RESET SLAVE 'masterX'" totally removes the masterX configuration. Update: moved the description of the problem into subtask |
| Comment by Elena Stepanova [ 2012-09-26 ] |
|
Created a subtask https://mariadb.atlassian.net/browse/MDEV-547 for a problem with sql_slave_skip_counter (with a test file and result file). Hopefully subtasks will be easier to track, a list of comments becomes messy. |
| Comment by Michael Widenius [ 2012-09-27 ] |
|
Have not been able to repeat the problem with memory allocation until very late last night. Will fix tomorrow. Have fixed the following issues:
It's intentionally that RESET SLAVE removes the master configuration (this comes from the original patch).
|
| Comment by Elena Stepanova [ 2012-09-27 ] |
|
Cannot we still use "RESET SLAVE 'name' ALL" to remove everything and "RESET SLAVE 'name'" to only remove the logs and position? It would be consistent with what we have for single-source: now 'RESET SLAVE ALL' removes the entire configuration, while 'RESET SLAVE' only removes logs and the position. For the memory problem, I'll try to create a shorter test case, to reduce the amount of noise in the trace. The problem itself is reproducible on my machines and on perro, both with the plain cmake build and with BUILD/compile-pentium-debug-max. So if it doesn't happen on your boxes, maybe you could try there. I can set up the environment so you would only have to run the test. |
| Comment by Elena Stepanova [ 2012-10-01 ] |
|
With the new usage of max_relay_log_size we are getting extra warnings in the standard test suite (as below). Should we add the warnings to the result files, or are you planning to change the algorithm somehow? CURRENT_TEST: rpl.rpl_deadlock_innodb
mysqltest: Result length mismatch |
| Comment by Michael Widenius [ 2012-10-03 ] |
|
The warning for max_relay_log_size is ok in my opinion. Now it works like max_binlog_size and other variables. |
| Comment by Michael Widenius [ 2012-11-18 ] |
|
Pushed into 10.0-base |