linweiway67 于 2014.09.01 15:16 提问
- 关于mysql redo log的问题。
According to the crash recovery logic of mysql server, we only need to write/sync prepared transaction before writing to binlog. And currently transactions are not grouped during innodb prepare stage.
I changed the related code described as bellow:
don’t sync redo log during innodb prepare stage if binlog enabled.
during flush stage of group commit (In function process_flush_stage_queue)
a) collect group commit queue
b) call ha_flush_logs to sync redo log (make sure all redo log of prepared transaction in current
queue were synced before writing to binlog)
--innobase_flush_logs have to be changed.
c) flush thread cache to binlog file for every thd in queue