mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Bug#54914: InnoDB: performance drop with innodb_change_buffering=all
Reduce ibuf_mutex and ibuf_pessimistic_insert_mutex contention further. Protect ibuf->empty by the insert buffer root page latch, not ibuf_mutex. ibuf_tree_root_get(): Assert that ibuf_mutex is owned by the caller. Assert that the stamped page number is correct. Assert that ibuf->empty agrees with the root page. ibuf_size_update(): Do not update ibuf->empty. ibuf_init_at_db_start(): Update ibuf->empty while holding the root page latch. ibuf_add_free_page(): Return TRUE/FALSE instead of DB_SUCCESS/DB_STRONG_FAIL. ibuf_remove_free_page(): Release ibuf_pessimistic_insert_mutex as early as possible. ibuf_contract_ext(): Rely on a dirty read of ibuf->empty, unless the server is being shut down. Never acquire ibuf_mutex. Eliminate n_stored. ibuf_contract_after_insert(): Never acquire ibuf_mutex. Perform dirty reads of ibuf->size and ibuf->max_size. ibuf_insert_low(): Only acquire ibuf_mutex for mode==BTR_MODIFY_TREE. Perform dirty reads of ibuf->size and ibuf->max_size. Update ibuf->empty while holding the root page latch. ibuf_delete_rec(): Update ibuf->empty while holding the root page latch. ibuf_is_empty(): Release ibuf_mutex earlier.
This commit is contained in:
parent
a4c5cf7ca9
commit
271e6ae341
2 changed files with 134 additions and 127 deletions
|
|
@ -46,11 +46,12 @@ struct ibuf_struct{
|
|||
ulint seg_size; /*!< allocated pages of the file
|
||||
segment containing ibuf header and
|
||||
tree */
|
||||
ibool empty; /*!< after an insert to the ibuf tree
|
||||
is performed, this is set to FALSE,
|
||||
and if a contract operation finds
|
||||
the tree empty, this is set to
|
||||
TRUE */
|
||||
ibool empty; /*!< Protected by the page
|
||||
latch of the root page of the
|
||||
insert buffer tree
|
||||
(FSP_IBUF_TREE_ROOT_PAGE_NO). TRUE
|
||||
if and only if the insert
|
||||
buffer tree is empty. */
|
||||
ulint free_list_len; /*!< length of the free list */
|
||||
ulint height; /*!< tree height */
|
||||
dict_index_t* index; /*!< insert buffer index */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue