Details
-
Bug
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Incomplete
-
10.5
Description
Our test guys tried to create tables with 500 concurrent sessions (each session 200 tables)and cause slow queries.
I used pstack to inspect the stacks and found most threads are waiting for the mutex of global variable dict_sys
I viewed the related codes in method
ha_innobase::create
and think the lock range is too large.
row_mysql_lock_data_dictionary / row_mysql_unlock_data_dictionary between
error = info.create_table(own_trx)
In create_table_info_t::create_table, there are a lot of object allocation or simply setting members in those objects before attaching them to the cache of global variable dict_sys. IMO those steps don't require mutex of global dict.
Would it be better if we make the mutex dict_sys fine-grained instead of locking whole process of create_table_info_t::create_table
Attachments
Issue Links
- relates to
-
MDEV-24258 Merge dict_sys.mutex into dict_sys.latch
- Closed