Browse Source

Hopefully final fix of Bug#11766591 59733: Possible deadlock

when buffered changes are to be discarded

ibuf_add_free_page(): Lower the latching order of the newly allocated page
to SYNC_IBUF_TREE_NODE_NEW after latching the insert buffer tree root.

This bug always was bogus UNIV_SYNC_DEBUG alarm. The function
buf_block_dbg_add_level() is a no-op unless UNIV_SYNC_DEBUG is defined.
pull/47/merge
Marko Mäkelä 14 years ago
parent
commit
b1f927f5be
  1. 4
      storage/innobase/ibuf/ibuf0ibuf.c
  2. 4
      storage/innodb_plugin/ibuf/ibuf0ibuf.c

4
storage/innobase/ibuf/ibuf0ibuf.c

@ -1687,12 +1687,12 @@ ibuf_add_free_page(
mutex_enter(&ibuf_mutex);
root = ibuf_tree_root_get(ibuf_data, space, &mtr);
#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 */
flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,

4
storage/innodb_plugin/ibuf/ibuf0ibuf.c

@ -1770,13 +1770,13 @@ ibuf_add_free_page(void)
mutex_enter(&ibuf_mutex);
root = ibuf_tree_root_get(&mtr);
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW);
page = buf_block_get_frame(block);
}
root = ibuf_tree_root_get(&mtr);
/* Add the page to the free list and update the ibuf size data */
flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,

Loading…
Cancel
Save