MDEV-15090 Reduce the overhead of writing undo log records
Inside InnoDB, each mini-transaction that generates any redo log records will acquire log_sys->mutex during mtr_t::commit() in order to copy the records into the global log_sys->buf for writing into the redo log file. For single-row transactions, this incurs quite a bit of overhead. We would use two mini-transactions for writing a record into a freshly updated undo log page. (Only if the undo record will not fit in that page, then we will have to commit and restart the mini-transaction.) trx_undo_assign(): Assign undo log for a persistent transaction, or return the already assigned one. trx_undo_assign_low(): Assign undo log for an operation on a persistent or temporary table. trx_undo_create(), trx_undo_reuse_cached(): Remove redundant parameters. Merge the logic from trx_undo_mark_as_dict_operation().
Showing
Please register or sign in to comment