mariadb/storage/innobase/trx
Marko Mäkelä 13dcdb0903 MDEV-11802 InnoDB purge does not always run when there is work to do
srv_sys_t::n_threads_active[]: Protect writes by both the mutex and
by atomic memory access.

srv_active_wake_master_thread_low(): Reliably wake up the master
thread if there is work to do. The trick is to atomically read
srv_sys->n_threads_active[].

srv_wake_purge_thread_if_not_active(): Atomically read
srv_sys->n_threads_active[] (and trx_sys->rseg_history_len),
so that the purge should always be triggered when there is work to do.

trx_commit_in_memory(): Invoke srv_wake_purge_thread_if_not_active()
whenever a transaction is committed. Purge could have been prevented by
the read view of the currently committing transaction, even if it is
a read-only transaction.

trx_purge_add_update_undo_to_history(): Do not wake up the purge.
This is only called by trx_undo_update_cleanup(), as part of
trx_write_serialisation_history(), which in turn is only called by
trx_commit_low() which will always call trx_commit_in_memory().
Thus, the added call in trx_commit_in_memory() will cover also
this use case where a committing read-write transaction added
some update_undo log to the purge queue.

trx_rseg_mem_restore(): Atomically modify trx_sys->rseg_history_len.
2017-04-26 23:03:31 +03:00
..
trx0i_s.cc MDEV-12488 Remove type mismatch in InnoDB printf-like calls 2017-04-21 18:03:15 +03:00
trx0purge.cc MDEV-11802 InnoDB purge does not always run when there is work to do 2017-04-26 23:03:31 +03:00
trx0rec.cc MDEV-12289 Keep 128 persistent rollback segments for compatibility and performance 2017-03-31 18:53:04 +03:00
trx0roll.cc Rename InnoDB transaction undo logging predicates. 2017-03-30 14:35:19 +03:00
trx0rseg.cc MDEV-11802 InnoDB purge does not always run when there is work to do 2017-04-26 23:03:31 +03:00
trx0sys.cc Adapt the innodb_undo tests from MySQL 5.7 2017-04-26 23:03:28 +03:00
trx0trx.cc MDEV-11802 InnoDB purge does not always run when there is work to do 2017-04-26 23:03:31 +03:00
trx0undo.cc MDEV-12289 Keep 128 persistent rollback segments for compatibility and performance 2017-03-31 18:53:04 +03:00