Mysql双机冗余机制,主备切换的极限时间内仍在写数据是否存在数据丢失的可能

主主同步配置文件

Mysql双机冗余机制,主备切换的极限时间内仍在写数据是否存在数据丢失的可能

疑问:系统在对数据库进行修改操作过程中,主服务器宕机,在主备切换的极限时间内,此时是否会存在备用服务器尚未同步主服务器数据导致数据丢失?

254主机:

#innodb_thread_concurrency=10
#将复制事件写入binlog,既作主库又作从库需开启
log-slave-updates = true
server-id=1
log-bin=foms_bin
sync_binlog=1
binlog_format=mixed
auto_increment_increment = 1
auto_increment_offset = 1 
max_binlog_size=512m
expire_logs_days=1
binlog_do_db=foms
binlog_ignore_db=mysql
binlog_ignore_db=information_schema
replicate_do_db=foms

replicate_wild_ignore_table=foms.log
slave_skip_errors=all

253主机:

innodb_flush_log_at_trx_commit=2

# The size of the buffer InnoDB uses for buffering log data. As soon as
# it is full, InnoDB will have to flush it to disk. As it is flushed
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size=4M

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size=305M

# Size of each log file in a log group. You should set the combined size
# of log files to about 25%-100% of your buffer pool size to avoid
# unneeded buffer pool flush activity on log file overwrite. However,
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size=61M

# Number of threads allowed inside the InnoDB kernel. The optimal value
# depends highly on the application, hardware as well as the OS
# scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency=50


#innodb_thread_concurrency=10
log-slave-updates = True
server-id=2
log-bin=foms_bin
sync_binlog=1
binlog_format=mixed
auto_increment_increment = 2
auto_increment_offset = 1 
max_binlog_size=512m
expire_logs_days=1
binlog_do_db=foms
binlog_ignore_db=mysql
binlog_ignore_db=information_schema
replicate_do_db=foms

replicate_wild_ignore_table=foms.log
slave_skip_errors=all
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!