Commit 928b12e5 authored by Marko Mäkelä's avatar Marko Mäkelä

Bug#11766591 59733: POSSIBLE DEADLOCK WHEN BUFFERED CHANGES ARE DISCARDED

Tweak the faulty UNIV_SYNC_DEBUG diagnostics a little bit more.

ibuf_add_free_page(): Lower the latching order of the newly allocated page
only after acquiring the ibuf_mutex.
parent 1ebfa44b
......@@ -1683,14 +1683,14 @@ ibuf_add_free_page(
page = buf_page_get(space, page_no, RW_X_LATCH, &mtr);
#ifdef UNIV_SYNC_DEBUG
buf_page_dbg_add_level(page, SYNC_TREE_NODE_NEW);
#endif /* UNIV_SYNC_DEBUG */
ibuf_enter();
mutex_enter(&ibuf_mutex);
#ifdef UNIV_SYNC_DEBUG
buf_page_dbg_add_level(page, SYNC_TREE_NODE_NEW);
#endif /* UNIV_SYNC_DEBUG */
root = ibuf_tree_root_get(ibuf_data, space, &mtr);
/* Add the page to the free list and update the ibuf size data */
......
......@@ -1766,16 +1766,15 @@ ibuf_add_free_page(void)
block = buf_page_get(
IBUF_SPACE_ID, 0, page_no, RW_X_LATCH, &mtr);
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW);
ibuf_enter();
mutex_enter(&ibuf_mutex);
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW);
page = buf_block_get_frame(block);
}
ibuf_enter();
mutex_enter(&ibuf_mutex);
root = ibuf_tree_root_get(&mtr);
/* Add the page to the free list and update the ibuf size data */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment