diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-01-26 09:00:43 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-01-27 15:45:38 +0200 |
commit | 898dcf93a886a68450dce7713208fdad82f9178e (patch) | |
tree | 6c3d06ea0bcf9fc3e782ea2b0745978791436782 /storage/innobase/include/lock0priv.h | |
parent | 469da6c34ddde8efabdded63aa3b74b1470f9c00 (diff) | |
download | mariadb-git-898dcf93a886a68450dce7713208fdad82f9178e.tar.gz |
Cleanup the lock creation
LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK, LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK,
LOCK_RELEASE_INTERVAL: Replace with the bare use of the constants.
lock_rec_create_low(): Remove LOCK_PAGE_BITMAP_MARGIN altogether.
We already have REDZONE_SIZE as a 'safety margin' in AddressSanitizer
builds, to catch any out-of-bounds access.
lock_prdt_add_to_queue(): Avoid a useless search when enqueueing
a waiting lock request.
lock_prdt_lock(): Reduce the size of the trx->mutex critical section.
Diffstat (limited to 'storage/innobase/include/lock0priv.h')
-rw-r--r-- | storage/innobase/include/lock0priv.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/storage/innobase/include/lock0priv.h b/storage/innobase/include/lock0priv.h index 28b6fc463b7..906a2a2b514 100644 --- a/storage/innobase/include/lock0priv.h +++ b/storage/innobase/include/lock0priv.h @@ -120,24 +120,6 @@ operator<<(std::ostream& out, const ib_lock_t& lock) extern ibool lock_print_waits; #endif /* UNIV_DEBUG */ -/** Restricts the length of search we will do in the waits-for -graph of transactions */ -static const ulint LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK = 1000000; - -/** Restricts the search depth we will do in the waits-for graph of -transactions */ -static const ulint LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK = 200; - -/** When releasing transaction locks, this specifies how often we release -the lock mutex for a moment to give also others access to it */ -static const ulint LOCK_RELEASE_INTERVAL = 1000; - -/* Safety margin when creating a new record lock: this many extra records -can be inserted to the page without need to create a lock with a bigger -bitmap */ - -static const ulint LOCK_PAGE_BITMAP_MARGIN = 64; - /* An explicit record lock affects both the record and the gap before it. An implicit x-lock does not affect the gap, it only locks the index record from read or update. |