Browse Source

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.
pull/374/head
Marko Mäkelä 14 years ago
parent
commit
132f023b08
  1. 8
      storage/innobase/ibuf/ibuf0ibuf.c
  2. 9
      storage/innodb_plugin/ibuf/ibuf0ibuf.c

8
storage/innobase/ibuf/ibuf0ibuf.c

@ -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 */

9
storage/innodb_plugin/ibuf/ibuf0ibuf.c

@ -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 */

Loading…
Cancel
Save