-
Bill Qu authored
A crash commit error causes the last transaction to loss in an InnoDB table after RESET MASTER. The root cause is that the prepare phase causes fsync while the commit phase does not cause fsync inside InnoDB. That means the last transaction is not fsynced inside InnoDB. But RESET MASTER erases binlog events of the last transaction. In the following crash commit error, InnoDB has the last prepared row on recovery and calls server on how to deal with the prepared row and server does not find relevant binlog events from binary log file and rolls it back finally. To fix the problem, RESET MASTER should cause to flush logs for storage engines, so that the last transaction is fsynced inside storage engines. The same solution to internal EXPIRE_LOGS_DAYS. There is not the problem with PURGE BINARY LOGS TO, as the binlog events of last transaction in current binlog file is not purged.
Bill Qu authoredA crash commit error causes the last transaction to loss in an InnoDB table after RESET MASTER. The root cause is that the prepare phase causes fsync while the commit phase does not cause fsync inside InnoDB. That means the last transaction is not fsynced inside InnoDB. But RESET MASTER erases binlog events of the last transaction. In the following crash commit error, InnoDB has the last prepared row on recovery and calls server on how to deal with the prepared row and server does not find relevant binlog events from binary log file and rolls it back finally. To fix the problem, RESET MASTER should cause to flush logs for storage engines, so that the last transaction is fsynced inside storage engines. The same solution to internal EXPIRE_LOGS_DAYS. There is not the problem with PURGE BINARY LOGS TO, as the binlog events of last transaction in current binlog file is not purged.
Loading