mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#35542 Add option to sync master and relay log to disk after every event
BUG#31665 sync_binlog should cause relay logs to be synchronized NOTE: Backporting the patch to next-mr. Add sync_relay_log option to server, this option works for relay log the same as option sync_binlog for binlog. This option also synchronize master info to disk when set to non-zero value. Original patches from Sinisa and Mark, with some modifications
This commit is contained in:
@ -552,7 +552,8 @@ ulong max_prepared_stmt_count;
|
||||
*/
|
||||
ulong prepared_stmt_count=0;
|
||||
ulong thread_id=1L,current_pid;
|
||||
ulong slow_launch_threads = 0, sync_binlog_period;
|
||||
ulong slow_launch_threads = 0;
|
||||
uint sync_binlog_period= 0, sync_relaylog_period= 0;
|
||||
ulong expire_logs_days = 0;
|
||||
ulong rpl_recovery_rank=0;
|
||||
const char *log_output_str= "FILE";
|
||||
@ -5667,7 +5668,8 @@ enum options_mysqld
|
||||
OPT_SLAVE_EXEC_MODE,
|
||||
OPT_GENERAL_LOG_FILE,
|
||||
OPT_SLOW_QUERY_LOG_FILE,
|
||||
OPT_IGNORE_BUILTIN_INNODB
|
||||
OPT_IGNORE_BUILTIN_INNODB,
|
||||
OPT_SYNC_RELAY_LOG
|
||||
};
|
||||
|
||||
|
||||
@ -6921,8 +6923,13 @@ The minimum value for this variable is 4096.",
|
||||
{"sync-binlog", OPT_SYNC_BINLOG,
|
||||
"Synchronously flush binary log to disk after every #th event. "
|
||||
"Use 0 (default) to disable synchronous flushing.",
|
||||
(uchar**) &sync_binlog_period, (uchar**) &sync_binlog_period, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 0, 0, ULONG_MAX, 0, 1, 0},
|
||||
(uchar**) &sync_binlog_period, (uchar**) &sync_binlog_period, 0, GET_UINT,
|
||||
REQUIRED_ARG, 0, 0, (longlong) UINT_MAX, 0, 1, 0},
|
||||
{"sync-relay-log", OPT_SYNC_RELAY_LOG,
|
||||
"Synchronously flush relay log to disk after every #th event. "
|
||||
"Use 0 (default) to disable synchronous flushing.",
|
||||
(uchar**) &sync_relaylog_period, (uchar**) &sync_relaylog_period, 0, GET_UINT,
|
||||
REQUIRED_ARG, 0, 0, (longlong) UINT_MAX, 0, 1, 0},
|
||||
{"sync-frm", OPT_SYNC_FRM, "Sync .frm to disk on create. Enabled by default.",
|
||||
(uchar**) &opt_sync_frm, (uchar**) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
|
||||
0, 0, 0, 0},
|
||||
|
Reference in New Issue
Block a user