mariadb/storage/innobase/log
Marko Mäkelä 5e93fe11cb MDEV-37677: Inconsistent flush_list after InnoDB recovery
In commit bea4adcb5a (MDEV-35225)
we inadvertently introduced a race condition. Another thread
may invoke buf_page_t::write_complete() between the time
log_sort_flush_list() inserted the block to the list for sorting,
and the time it would apply the sorted list back to buf_pool.flush_list.
In this case, log_sort_flush_list() would neither add the block to
buf_pool.flush_list nor clear the buf_page_t::oldest_modification_
so that it would correctly indicate whether the block is in the list.

log_sort_flush_list(): Simplify the logic, and always add the entire
sorted list to the buf_pool.flush_list, even if they had been written
back during the time we were copying or sorting.

This fixes an anomaly where a subsequent
buf_pool_t::insert_into_flush_list() would end up incrementing
buf_pool.flush_list.count by one too much.

Thanks to Daniel Black for providing an "rr replay" trace of a
failure.
2025-10-10 12:31:07 +03:00
..
log0crypt.cc Merge 10.5 into 10.6 2021-06-23 09:24:32 +03:00
log0log.cc MDEV-35171 OS_FILE_NORMAL and OS_FILE_AIO are misleading 2024-10-21 15:31:32 +02:00
log0recv.cc MDEV-37677: Inconsistent flush_list after InnoDB recovery 2025-10-10 12:31:07 +03:00
log0sync.cc Fixed compiler error with framesize=16384 in InnoDB log0sync.cc 2025-07-27 16:35:12 +03:00
log0sync.h MDEV-26789 log_write_up_to needs mechanism to prevent stalls of async. waiters 2021-10-08 13:18:59 +02:00