mariadb/mysql-test/suite/rpl/r
Alfranio Correia 3ab71376ce BUG#40337 Fsyncing master and relay log to disk after every event is too slow
NOTE: Backporting the patch to next-mr.
      
The fix proposed in BUG#35542 and BUG#31665 introduces a performance issue
when fsyncing the master.info, relay.info and relay-log.bin* after #th events.
Although such solution has been proposed to reduce the probability of corrupted
files due to a slave-crash, the performance penalty introduced by it has
made the approach impractical for highly intensive workloads.
      
In a nutshell, the option --syn-relay-log proposed in BUG#35542 and BUG#31665
simultaneously fsyncs master.info, relay-log.info and relay-log.bin* and
this is the main source of performance issues.
      
This patch introduces new options that give more control to the user on
what should be fsynced and how often:
      
   1) (--sync-master-info, integer) which syncs the master.info after #th event;
   2) (--sync-relay-log, integer) which syncs the relay-log.bin* after #th
   events.
   3) (--sync-relay-log-info, integer) which syncs the relay.info after #th
   transactions.
      
   To provide both performance and increased reliability, we recommend the following
   setup:
      
   1) --sync-master-info = 0 eventually the operating system will fsync it;
   2) --sync-relay-log = 0 eventually the operating system will fsync it;
   3) --sync-relay-log-info = 1 fsyncs it after every transaction;
      
Notice, that the previous setup does not reduce the probability of
corrupted master.info and relay-log.bin*. To overcome the issue, this patch also
introduces a recovery mechanism that right after restart throws away relay-log.bin*
retrieved from a master and updates the master.info based on the relay.info:
      
      
   4) (--relay-log-recovery, boolean) which enables a recovery mechanism that
   throws away relay-log.bin* after a crash.
      
However, it can only recover the incorrect binlog file and position in master.info,
if other informations (host, port password, etc) are corrupted or incorrect,
then this recovery mechanism will fail to work.
2009-09-29 15:40:52 +01:00
..
rpl000001.a.result
rpl000001.b.result
rpl000010.result
rpl000011.result
rpl000013.result
rpl000017.result
rpl_000015.result
rpl_alter.result
rpl_alter_db.result
rpl_auto_increment.result
rpl_auto_increment_11932.result
rpl_begin_commit_rollback.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
rpl_binlog_corruption.result
rpl_binlog_grant.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
rpl_binlog_max_cache_size.result BUG#43929 binlog corruption when max_binlog_cache_size is exceeded 2009-06-18 14:52:46 +01:00
rpl_binlog_query_filter_rules.result
rpl_bit.result
rpl_bit_npk.result
rpl_blackhole.result
rpl_bug26395.result
rpl_bug31076.result
rpl_bug33931.result Bug #42408 Faulty regex for detecting [Warning] and [ERROR] in mysqld error log 2009-08-28 16:13:27 +02:00
rpl_bug38694.result moving bug#38694 test files into rpl suite 2009-04-30 16:20:38 +03:00
rpl_change_master.result
rpl_charset.result
rpl_charset_sjis.result
rpl_circular_for_4_hosts.result
rpl_colSize.result
rpl_commit_after_flush.result
rpl_concurrency_error.result BUG#46130 Slave does not correctly handle "expected errors" 2009-08-13 17:21:01 +01:00
rpl_create_database.result
rpl_create_if_not_exists.result Bug #44331 Restore of database with events produces warning in replication 2009-08-29 16:52:22 +08:00
rpl_create_tmp_table_if_not_exists.result BUG#45574 CREATE IF NOT EXISTS is not binlogged if the object exists 2009-08-13 10:48:57 +08:00
rpl_critical_errors.result
rpl_critical_errors.result.txt
rpl_cross_version.result
rpl_ddl.result
rpl_deadlock_innodb.result Bug#37716. 2009-04-04 01:33:13 +04:00
rpl_delete_no_where.result
rpl_do_grant.result 46996 workaruond 2009-09-01 13:38:17 +02:00
rpl_drop.result
rpl_drop_db.result
rpl_drop_if_exists.result Bug #44331 Restore of database with events produces warning in replication 2009-08-29 16:52:22 +08:00
rpl_drop_temp.result merge mysql-5.0-bugteam --> mysql-5.1-bugteam 2009-08-28 10:45:57 +01:00
rpl_drop_view.result
rpl_dual_pos_advance.result
rpl_EE_err.result
rpl_empty_master_crash.result
rpl_err_ignoredtable.result
rpl_events.result Bug #44331 Restore of database with events produces warning in replication 2009-08-31 10:26:01 +08:00
rpl_extraCol_innodb.result BUG#38173 Field doesn't have a default value with row-based replication 2009-09-29 15:04:21 +01:00
rpl_extraCol_myisam.result BUG#38173 Field doesn't have a default value with row-based replication 2009-09-29 15:04:21 +01:00
rpl_extraColmaster_innodb.result
rpl_extraColmaster_myisam.result
rpl_failed_optimize.result
rpl_filter_tables_not_exist.result
rpl_flushlog_loop.result BUG#40337 Fsyncing master and relay log to disk after every event is too slow 2009-09-29 15:40:52 +01:00
rpl_foreign_key_innodb.result
rpl_found_rows.result
rpl_free_items.result
rpl_get_lock.result
rpl_get_master_version_and_clock.result Bug #45214 get_master_version_and_clock does not report error when queries fail 2009-07-16 14:56:43 +08:00
rpl_grant.result
rpl_idempotency.result Bug #42408 Faulty regex for detecting [Warning] and [ERROR] in mysqld error log 2009-08-25 15:56:50 +02:00
rpl_ignore_grant.result
rpl_ignore_revoke.result
rpl_ignore_table.result
rpl_ignore_table_update.result
rpl_incident.result
rpl_init_slave.result
rpl_init_slave_errors.result Bug #42408 Faulty regex for detecting [Warning] and [ERROR] in mysqld error log 2009-08-28 16:13:27 +02:00
rpl_innodb.result
rpl_innodb_bug28430.result
rpl_innodb_bug30888.result
rpl_innodb_mixed_ddl.result
rpl_innodb_mixed_dml.result Bug #44331 Restore of database with events produces warning in replication 2009-08-29 16:52:22 +08:00
rpl_insert.result
rpl_insert_id.result
rpl_insert_id_pk.result
rpl_insert_ignore.result
rpl_insert_select.result
rpl_invoked_features.result
rpl_killed_ddl.result Manually merge BUG#37145 to 5.1-bugteam 2009-04-09 07:42:51 +08:00
rpl_known_bugs_detection.result
rpl_LD_INFILE.result
rpl_load_from_master.result
rpl_load_table_from_master.result
rpl_loaddata.result
rpl_loaddata_charset.result Manual Merge 2009-08-12 13:31:56 +08:00
rpl_loaddata_fatal.result
rpl_loaddata_m.result
rpl_loaddata_map.result
rpl_loaddata_s.result
rpl_loaddata_simple.result
rpl_loaddatalocal.result
rpl_loadfile.result Worked around the problem described in bug #43884. 2009-03-27 12:59:31 +02:00
rpl_locale.result
rpl_log_pos.result
rpl_many_optimize.result
rpl_master_pos_wait.result
rpl_misc_functions.result
rpl_mixed_bit_pk.result
rpl_mixed_ddl_dml.result
rpl_multi_delete.result
rpl_multi_delete2.result
rpl_multi_engine.result
rpl_multi_update.result
rpl_multi_update2.result
rpl_multi_update3.result
rpl_multi_update4.result
rpl_name_const.result Manually merge BUG#37145 to 5.1-bugteam 2009-04-09 07:42:51 +08:00
rpl_not_null_innodb.result BUG#43789 different master/slave table defs cause crash: text/varchar null 2009-09-29 15:18:44 +01:00
rpl_not_null_myisam.result BUG#43789 different master/slave table defs cause crash: text/varchar null 2009-09-29 15:18:44 +01:00
rpl_optimize.result
rpl_packet.result
rpl_plugin_load.result
rpl_ps.result
rpl_rbr_to_sbr.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
rpl_read_only.result
rpl_relay_space_innodb.result
rpl_relay_space_myisam.result
rpl_relayrotate.result
rpl_relayspace.result
rpl_replicate_do.result
rpl_replicate_ignore_db.result
rpl_report.result
rpl_rewrt_db.result merge mysql-5.0-bugteam --> mysql-5.1-bugteam 2009-08-28 10:45:57 +01:00
rpl_rotate_logs.result
rpl_row_001.result
rpl_row_4_bytes.result
rpl_row_basic_2myisam.result
rpl_row_basic_3innodb.result
rpl_row_basic_8partition.result
rpl_row_basic_11bugs-master.opt
rpl_row_basic_11bugs-slave.opt
rpl_row_basic_11bugs.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
rpl_row_blob_innodb.result
rpl_row_blob_myisam.result
rpl_row_colSize.result
rpl_row_conflicts.result
rpl_row_create_table.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
rpl_row_delayed_ins.result
rpl_row_drop.result
rpl_row_err_ignoredtable.result
rpl_row_flsh_tbls.result
rpl_row_func001.result
rpl_row_func002.result
rpl_row_func003.result
rpl_row_inexist_tbl.result
rpl_row_insert_delayed.result
rpl_row_loaddata_m.result
rpl_row_log.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
rpl_row_log_innodb.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
rpl_row_max_relay_size.result
rpl_row_multi_query.result
rpl_row_mysqlbinlog.result
rpl_row_NOW.result
rpl_row_reset_slave.result BUG#44270: RESET SLAVE does not reset Last_IO_Error or Last_IO_Errno 2009-06-03 15:14:18 +01:00
rpl_row_show_relaylog_events.result BUG#28777, WL#4293: SHOW BINLOG EVENTS does not work on relay log 2009-09-29 00:04:20 +01:00
rpl_row_sp001.result
rpl_row_sp002_innodb.result
rpl_row_sp003.result
rpl_row_sp005.result
rpl_row_sp006_InnoDB.result
rpl_row_sp007_innodb.result
rpl_row_sp008.result
rpl_row_sp009.result
rpl_row_sp010.result
rpl_row_sp011.result
rpl_row_sp012.result
rpl_row_stop_middle_update.result
rpl_row_tabledefs_2myisam.result BUG#38173 Field doesn't have a default value with row-based replication 2009-09-29 15:04:21 +01:00
rpl_row_tabledefs_3innodb.result BUG#38173 Field doesn't have a default value with row-based replication 2009-09-29 15:04:21 +01:00
rpl_row_tabledefs_7ndb.result
rpl_row_trig001.result
rpl_row_trig002.result
rpl_row_trig003.result
rpl_row_trig004.result
rpl_row_unsafe_funcs.result
rpl_row_until.result
rpl_row_USER.result
rpl_row_UUID.result
rpl_row_view01.result
rpl_row_wide_table.result Bug#42977 RBR logs for rows with more than 250 column results in corrupt binlog 2009-03-25 12:53:56 +02:00
rpl_server_id.result
rpl_server_id1.result
rpl_server_id2.result
rpl_session_var.result
rpl_set_charset.result
rpl_sf.result BUG#41166 stored function requires "deterministic" if binlog_format is "statement" 2009-07-28 18:44:38 +01:00
rpl_skip_error.result BUG#39393. Post-fix for test rpl_skip_error. 2009-04-08 22:02:19 +01:00
rpl_slave_grp_exec.result
rpl_slave_load_in.result
rpl_slave_load_remove_tmpfile.result 46996 workaruond 2009-09-01 13:38:17 +02:00
rpl_slave_load_tmpdir_not_exist.result BUG#43949 Initialization of slave produces a warning message in Valgrind 2009-04-19 02:21:33 +01:00
rpl_slave_skip.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
rpl_slave_status.result
rpl_sp.result
rpl_sp004.result
rpl_sp_effects.result
rpl_sporadic_master.result
rpl_ssl.result
rpl_ssl1.result
rpl_start_stop_slave.result Bug #38205 Row-based Replication (RBR) causes inconsistencies: HA_ERR_FOUND_DUPP_KEY 2009-04-09 16:05:41 +03:00
rpl_stm_000001.result
rpl_stm_auto_increment_bug33029.result
rpl_stm_conflicts.result
rpl_stm_EE_err2.result
rpl_stm_flsh_tbls.result
rpl_stm_insert_delayed.result
rpl_stm_loadfile.result Post fix of result file after push of BUG#42415 2009-05-20 18:28:43 +08:00
rpl_stm_log.result
rpl_stm_max_relay_size.result
rpl_stm_mix_show_relaylog_events.result BUG#28777, WL#4293: SHOW BINLOG EVENTS does not work on relay log 2009-09-29 00:04:20 +01:00
rpl_stm_mixing_engines.result BUG#46864 Incorrect update of InnoDB table on slave when using trigger with myisam table 2009-08-27 13:46:29 +01:00
rpl_stm_multi_query.result
rpl_stm_no_op.result
rpl_stm_reset_slave.result BUG#44270: RESET SLAVE does not reset Last_IO_Error or Last_IO_Errno 2009-06-03 15:14:18 +01:00
rpl_stm_until.result
rpl_switch_stm_row_mixed.result
rpl_sync.result BUG#40337 Fsyncing master and relay log to disk after every event is too slow 2009-09-29 15:40:52 +01:00
rpl_temp_table.result
rpl_temp_table_mix_row.result BUG#43046: mixed mode switch to row format with temp table lead 2009-07-26 22:48:24 +01:00
rpl_temporary.result BUG#41725: upmerge: 5.0-bt --> 5.1-bt 2009-05-23 00:29:41 +01:00
rpl_temporary_errors.result
rpl_timezone.result Fix test case erro in sles10-ia64-a. 2009-03-25 14:19:42 +08:00
rpl_trigger.result
rpl_trunc_temp.result
rpl_truncate_2myisam.result
rpl_truncate_3innodb.result
rpl_udf.result Post fix of result file after push of BUG#42415 2009-05-20 18:28:43 +08:00
rpl_user.result
rpl_user_variables.result
rpl_variables.result
rpl_variables_stm.result
rpl_view.result