Skip to content

Commit a447980

Browse files
committed
MDEV-14756 - Remove trx_sys_t::rw_trx_list
Let lock_print_info_all_transactions() iterate rw_trx_hash instead of rw_trx_list. When printing info of locks for transactions, InnoDB monitor doesn't attempt to read relevant page from disk anymore. The code was prone to race conditions. Note that TrxListIterator didn't work as advertised: it iterated rw_trx_list only.
1 parent 886af39 commit a447980

File tree

5 files changed

+43
-413
lines changed

5 files changed

+43
-413
lines changed

storage/innobase/include/trx0trx.h

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -368,22 +368,6 @@ trx_print_latched(
368368
ulint max_query_len);/*!< in: max query length to print,
369369
or 0 to use the default max length */
370370

371-
#ifdef WITH_WSREP
372-
/**********************************************************************//**
373-
Prints info about a transaction.
374-
Transaction information may be retrieved without having trx_sys->mutex acquired
375-
so it may not be completely accurate. The caller must own lock_sys->mutex
376-
and the trx must have some locks to make sure that it does not escape
377-
without locking lock_sys->mutex. */
378-
UNIV_INTERN
379-
void
380-
wsrep_trx_print_locking(
381-
FILE* f,/*!< in: output stream */
382-
const trx_t* trx,/*!< in: transaction */
383-
ulint max_query_len)/*!< in: max query length to print,
384-
or 0 to use the default max length */
385-
MY_ATTRIBUTE((nonnull));
386-
#endif /* WITH_WSREP */
387371
/**********************************************************************//**
388372
Prints info about a transaction.
389373
Acquires and releases lock_sys->mutex and trx_sys->mutex. */
@@ -852,7 +836,7 @@ transactions. The trx_sys->mutex prevents a race condition between it
852836
and lock_trx_release_locks() [invoked by trx_commit()].
853837
854838
* trx_print_low() may access transactions not associated with the current
855-
thread. The caller must be holding trx_sys->mutex and lock_sys->mutex.
839+
thread. The caller must be holding lock_sys->mutex.
856840
857841
* When a transaction handle is in the trx_sys->mysql_trx_list or
858842
trx_sys->trx_list, some of its fields must not be modified without

0 commit comments

Comments
 (0)