Bug #47037 | to port Bug #25998 fixes to telco | ||
---|---|---|---|
Submitted: | 1 Sep 2009 8:48 | Modified: | 31 Aug 2010 11:23 |
Reporter: | Andrei Elkin | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: Replication | Severity: | S3 (Non-critical) |
Version: | cluster 6.2 | OS: | Any |
Assigned to: | Andrei Elkin | CPU Architecture: | Any |
Tags: | backport |
[1 Sep 2009 8:48]
Andrei Elkin
[9 Sep 2009 18:33]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/82854 2993 Andrei Elkin 2009-09-09 Bug #47037 to port Bug25998 fixes to telco Repeating the parent bugfixes commits: Bug #25998 problems about circle replication Bug #27808 Infinite looping in circular replication to mysql-5.1-telco. In case of withdrawing one of the servers from the circular multi-master replication group events generated by the removed server could become unstoppable (bug#25998). That's because the originator had been the terminator of the own event flow. Other possibility of the unstoppable event is the cluster replication (bug#27808). In that case an event generated by a member of a cluster was replicated to another member, got accepted and executed. By that same time effects of the event had been already propagated across the cluster via the cluster communications. In order to avoid double-applying, a replication event generated by a co-member of the cluster should not be accepted. Both variations of the unstoppable replication event are fixable with introducing a new option for CHANGE MASTER: IGNORE_SERVER_IDS= (sid_1, sid_2, ... ) The option can be set to the empty list that resets. Fixed with implementing the feature. Properties of the feature: a. reporting an error if the id of an ignored server is the slave itself and its configuration on startup was with --replicate-same-server-id; b. overriding the existing IGNORE_SERVER_IDS list by the following CHANGE MASTER ... IGNORE_SERVER_IDS= (list), the empty list arg nullifies the current ignored list; c. preserving the existing list by CHANGE MASTER w/o IGNORE_SERVER_IDS; d. preserving the ignored server ids after RESET SLAVE; e. extending SHOW SLAVE STATUS with a new line listing ignored servers; f. a new line in master.info with the list of ignored servers; g. Differently from --replicate-same-server-id handling, the sql thread is not concerned with the ignored server ids, because it's supposed that the relay log consists only of events that can not be unstoppable. In order to guarantee that, e.g in case of the circular replication with a failing server DBA needs to change master necessarily using the new option. h. Rotate and FD events originated by the current master listed in the ignored list are still relay-logged which does not create any termination issue. i. The possible list of ignored servers is sorted for the fastest processing of filtering algorithm. Two new lines to show slave status output are added: the list of ignored servers and the current master server id (yet another feature for the user!). Use cases for this feature can be found on the bug report page. mysql-test/include/master-slave.inc@1.17, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +2 -0 forcing this basic macro to synchronize the slave right after it has connected to the master. Tests get the guarantee of synchronization at the beginning. mysql-test/suite/rpl/r/rpl_server_id_ignore.result@1.1, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +46 -0 new results mysql-test/suite/rpl/r/rpl_server_id_ignore.result@1.0, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +0 -0 mysql-test/suite/rpl/t/rpl_server_id_ignore-slave.opt@1.1, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +1 -0 --replicate-same-server-id is set in order to show reaction on its possible clashing with the new gnored_server_id:s option of change master. mysql-test/suite/rpl/t/rpl_server_id_ignore-slave.opt@1.0, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +0 -0 mysql-test/suite/rpl/t/rpl_server_id_ignore.test@1.1, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +114 -0 The basic tests for the new feature. mysql-test/suite/rpl/t/rpl_server_id_ignore.test@1.0, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +0 -0 sql/lex.h@1.184, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +1 -0 IGNORE_SERVER_ID new option for change master sql/rpl_mi.cc@1.16, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +82 -4 allocation, storing into master info, reading from the file, deallocation of the list of ignored server id:s; a new change_master_server_id_cmp() comparison function definition to use with bsearch; a new Master_info::shall_ignore_server_id() method definition, calling it to find out if a server_id should be ignored; a formal initialization of a new member Master_info::master_id; extending the number of lines in master.info. sql/rpl_mi.h@1.9, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +5 -0 a new method Master_info::shall_ignore_server_id answering filtering question; a new member Master_info::ignore_server_ids to hold the list of ignored servers; a new member Master_info::master_id to hold the current master server id; a new search function change_master_server_id_cmp() to use with bsearch. sql/share/errmsg.txt@1.134, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +2 -0 a new error message about possible clashing of options. sql/slave.cc@1.348, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +152 -11 a new init_dynarray_intvar_from_file() helper function to read an array of variable size of intergers. Refining io-thread's filtering condition to consult with the list of ignored servers. Note, that FD and Rotate events from an ignored server being the current master are still accepted. Filtering basing on --replicate-same-server-id remains as before if the ignored servers list is empty. Adding two new lines in show slave status. Initialization of the new member Master_info::master_id in get_master_version_and_clock(). Displaying the ignored servers and the current master id with show slave status. sql/sql_lex.h@1.320, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +2 -1 parser time storage for variable size array of server ids; a new repl_ignore_server_ids_opt member for LEX_MASTER_INFO; sql/sql_repl.cc@1.175, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +45 -14 aux function for sorting the ignored server_id:s; sorting of the ignored servers implementation; failing change master do not forget to free lex's dynamical storage with parsed ignored server_ids; resetting the old list of ignored server if the parser detected the new list; shifting some pieces of code in order to comply with the above logics; sql/sql_yacc.yy@1.540, 2008-06-04 19:39:26+03:00, aelkin@mysql1000.dsl.inet.fi +25 -0 allocation a dyn array for possible list of ignored server ids; filling the array; resetting (missed part of wl#342) heartbeat_opt at the beginning of CHANGE MASTER processing;
[15 Sep 2009 11:57]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/83264 2995 Martin Skold 2009-09-15 [merge] Merge modified: mysql-test/include/master-slave.inc mysql-test/suite/rpl/r/rpl_000015.result mysql-test/suite/rpl/r/rpl_bug33931.result mysql-test/suite/rpl/r/rpl_change_master.result mysql-test/suite/rpl/r/rpl_deadlock_innodb.result mysql-test/suite/rpl/r/rpl_extraCol_innodb.result mysql-test/suite/rpl/r/rpl_extraCol_myisam.result mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result mysql-test/suite/rpl/r/rpl_flushlog_loop.result mysql-test/suite/rpl/r/rpl_grant.result mysql-test/suite/rpl/r/rpl_incident.result mysql-test/suite/rpl/r/rpl_known_bugs_detection.result mysql-test/suite/rpl/r/rpl_loaddata.result mysql-test/suite/rpl/r/rpl_loaddata_fatal.result mysql-test/suite/rpl/r/rpl_log_pos.result mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result mysql-test/suite/rpl/r/rpl_replicate_do.result mysql-test/suite/rpl/r/rpl_rotate_logs.result mysql-test/suite/rpl/r/rpl_row_colSize.result mysql-test/suite/rpl/r/rpl_row_log.result mysql-test/suite/rpl/r/rpl_row_log_innodb.result mysql-test/suite/rpl/r/rpl_row_max_relay_size.result mysql-test/suite/rpl/r/rpl_row_reset_slave.result mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result mysql-test/suite/rpl/r/rpl_row_until.result mysql-test/suite/rpl/r/rpl_skip_error.result mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result mysql-test/suite/rpl/r/rpl_slave_skip.result mysql-test/suite/rpl/r/rpl_ssl.result mysql-test/suite/rpl/r/rpl_ssl1.result mysql-test/suite/rpl/r/rpl_stm_log.result mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result mysql-test/suite/rpl/r/rpl_stm_reset_slave.result mysql-test/suite/rpl/r/rpl_stm_until.result mysql-test/suite/rpl/r/rpl_temporary_errors.result mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result sql/lex.h sql/rpl_mi.cc sql/rpl_mi.h sql/share/errmsg.txt sql/slave.cc sql/sql_lex.h sql/sql_repl.cc sql/sql_yacc.yy
[23 Sep 2009 15:48]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/84404 2994 Andrei Elkin 2009-09-23 bug#47037 to port Bug@25998 fixes to telco 6.2 the 2nd patch to address 6.2 -> 6.3 possible upgrade issue. The added ignore_server_ids param is stored as the last line in master.info on 6.2, but on 6.3 it would be buried by some more lines that are last currently in there. It was suggested to make the 6.2 configuration line to have the same offset (the 18th) in 6.2 as it would be in 6.3. Fixed with implementing the suggestion. The 6.2 master.info will have two blank lines before the terminal one describing ignore_server_ids.
[24 Sep 2009 11:06]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/84473 3050 Andrei Elkin 2009-09-24 [merge] manual merge of 6.2 fixes for bug#47037 to telco-6.3
[24 Sep 2009 11:11]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/84475 2995 Andrei Elkin 2009-09-24 [merge] merging from the repository to local 6.2 with fixes for bug#47037
[24 Sep 2009 11:23]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/84476 3051 Andrei Elkin 2009-09-24 [merge] merging from the repository to local 6.3 with fixes for bug#47037
[24 Sep 2009 11:45]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/84477 2996 Andrei Elkin 2009-09-24 bug#47037 the test case for the feature is added
[24 Sep 2009 11:47]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/84478 3052 Andrei Elkin 2009-09-24 [merge] merging from a local 6.2 with fixes for bug#47037 to local 6.3
[24 Sep 2009 11:49]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/84479 3053 Andrei Elkin 2009-09-24 [merge] merging from a local 6.2 with a test case for bug#47037 to local 6.3
[15 Dec 2009 15:03]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/94158 3051 Andrei Elkin 2009-12-15 [merge] bug#47037 improving display of master_server_id to show it as (ulong) -1 while the value is not yet gained from a real connected master
[16 Dec 2009 14:08]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/94502 3053 Andrei Elkin 2009-12-16 bug#47037 fixing master_server_id to stay initially 0
[16 Dec 2009 19:07]
Bugs System
Pushed into 5.1.39-ndb-7.0.11 (revid:aelkin@mysql.com-20091216190526-4tct6e6wemnvpk9u) (version source revid:aelkin@mysql.com-20091216142141-ah5dcz9p4iovc42z) (merge vers: 5.1.39-ndb-7.0.11) (pib:15)
[16 Dec 2009 19:07]
Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:aelkin@mysql.com-20091216190633-0ynjokf113p4fh8y) (version source revid:aelkin@mysql.com-20091216185320-72af4thcc6si5bqv) (merge vers: 5.1.39-ndb-7.1.0) (pib:15)
[16 Dec 2009 19:09]
Bugs System
Pushed into 5.1.39-ndb-6.3.31 (revid:aelkin@mysql.com-20091216190801-v1yi5z48wpe3jev8) (version source revid:aelkin@mysql.com-20091216141645-jo1o4jxc97gn69gx) (merge vers: 5.1.39-ndb-6.3.31) (pib:15)
[16 Dec 2009 19:11]
Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:aelkin@mysql.com-20091216191009-6c5xltzvs4d4hlqq) (version source revid:aelkin@mysql.com-20091216140816-fq0d1h7ktiloi3go) (merge vers: 5.1.39-ndb-6.2.19) (pib:15)
[17 Dec 2009 9:09]
Andrei Elkin
Patches pushed to the telco forest.
[31 Aug 2010 11:23]
Jon Stephens
Documented in the NDB-6.2.19, 6.3.31, 7.0.11, and 7.1.0 changelogs. Added info about IGNORE_SERVER IDS. See http://lists.mysql.com/commits/117208 for docs info. Closed.