diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-24 20:50:59 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-07-24 21:59:26 +0300 |
commit | 9e5df96751d2d13e0f9042f6235666f6dd65b1e0 (patch) | |
tree | 373d4681fd176a4cf25b106533001182073f607f /storage/innobase/include/srv0srv.h | |
parent | 2b5bc761d3a2a9b460b4cbb8e8a9ce0d50e63371 (diff) | |
download | mariadb-git-9e5df96751d2d13e0f9042f6235666f6dd65b1e0.tar.gz |
Reduce the amount of time(NULL) calls for lock processing
lock_t::requested_time: Document what the field is used for.
lock_t::wait_time: Document that the field is only used for
diagnostics and may be garbage if the system time is being adjusted.
srv_slot_t::suspend_time: Document that this is duplicating
trx_lock_t::wait_started.
lock_table_print(), lock_rec_print(): Declare in static scope.
Add a parameter for the current time.
lock_deadlock_check_and_resolve(), lock_deadlock_lock_print(),
lock_deadlock_joining_trx_print():
Add a parameter for the current time.
Diffstat (limited to 'storage/innobase/include/srv0srv.h')
-rw-r--r-- | storage/innobase/include/srv0srv.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 7e83f9fa725..37e249f3f07 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -1078,10 +1078,14 @@ struct srv_slot_t{ ibool suspended; /*!< TRUE if the thread is waiting for the event of this slot */ - ib_time_t suspend_time; /*!< time when the thread was - suspended. Initialized by - lock_wait_table_reserve_slot() - for lock wait */ + /** time(NULL) when the thread was suspended. + FIXME: Use my_interval_timer() or similar, to avoid bogus + timeouts in lock_wait_check_and_cancel() or lock_wait_suspend_thread() + when the system time is adjusted to the past! + + FIXME: This is duplicating trx_lock_t::wait_started, + which is being used for diagnostic purposes only. */ + time_t suspend_time; ulong wait_timeout; /*!< wait time that if exceeded the thread will be timed out. Initialized by |