diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2008-10-14 11:38:07 +0200 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2008-10-14 11:38:07 +0200 |
commit | ed567bd2a901b970f14aa707aa3a60ded921c2a3 (patch) | |
tree | 61df317833776ceb4edec616f8823938b6026aa5 /storage/maria/ma_blockrec.h | |
parent | 058916ae024baaf8a092e0130654f67ef7b9bcf1 (diff) | |
download | mariadb-git-ed567bd2a901b970f14aa707aa3a60ded921c2a3.tar.gz |
Fix for BUG#39210 "Maria deadlock in _ma_bitmap_wait_or_flush". It was a thread
which nobody woke up (see comment of ma_bitmap.c). No testcase, this requires
multiple threads and is automatically tested at push time by maria_stress.yy (pushbuild2).
storage/maria/ma_bitmap.c:
* _ma_bitmap_wait_or_flush() didn't publish that it was waiting for bitmap to not
be over-allocated (i.e. didn't modify bitmap->flush_all_requested) so nobody
(_ma_bitmap_flushable(), _ma_bitmap_release_unused()) knew it had to wake it up
=> it stalled (BUG#39210). In fact the wait in _ma_bitmap_wait_or_flush()
is not needed, it's ok if this function sends the over-allocated bitmap to page
cache and keeps pin on it (_ma_bitmap_unpin_all() will unpin it later, and
the one who added _ma_bitmap_wait_or_flush() didn't know it). Function
is thus deleted, as _ma_bitmap_flush() can do its job.
* After fixing that, test runs longer and BUG 39665 happens, which looks like
a separate page cache bug.
* Smaller changes: _ma_bitmap_flush_all() called write_changed_bitmap() even
though it might not be changed; added some DBUG calls in functions; split
assertions.
* In _ma_bitmap_release_unused(), it's more logical to test non_flushable_state
than now_transactional to know if we have to decrement non_flushable
(it's exactly per the definition of non_flushable_state).
storage/maria/ma_blockrec.c:
_ma_bitmap_wait_or_flush() is not needed.
******
new prototype and splitting assertion in three (3rd one fires: BUG 39665)
storage/maria/ma_blockrec.h:
_ma_bitmap_wait_or_flush() is not needed.
Diffstat (limited to 'storage/maria/ma_blockrec.h')
-rw-r--r-- | storage/maria/ma_blockrec.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/storage/maria/ma_blockrec.h b/storage/maria/ma_blockrec.h index 36d61852086..34f6a3e3008 100644 --- a/storage/maria/ma_blockrec.h +++ b/storage/maria/ma_blockrec.h @@ -182,7 +182,6 @@ maria_page_get_lsn(uchar *page, pgcache_page_no_t page_no, uchar* data_ptr); my_bool _ma_bitmap_init(MARIA_SHARE *share, File file); my_bool _ma_bitmap_end(MARIA_SHARE *share); my_bool _ma_bitmap_flush(MARIA_SHARE *share); -my_bool _ma_bitmap_wait_or_flush(MARIA_SHARE *share); my_bool _ma_bitmap_flush_all(MARIA_SHARE *share); void _ma_bitmap_reset_cache(MARIA_SHARE *share); my_bool _ma_bitmap_find_place(MARIA_HA *info, MARIA_ROW *row, |