mariadb/storage
Marko Mäkelä 4d37b1c4b9 MDEV-36886 log_t::get_lsn_approx() isn't lower bound
If the execution of the two reads in log_t::get_lsn_approx() is
interleaved with concurrent writes of those fields in
log_t::write_buf() or log_t::persist(), the returned approximation
will be an upper bound. If log_t::append_prepare_wait() is pending,
the approximation could be a lower bound.

We must adjust each caller of log_t::get_lsn_approx() for the
possibility that the return value is larger than
MAX(oldest_modification) in buf_pool.flush_list.

af_needed_for_redo(): Add a comment that explains why the glitch
is not a problem.

page_cleaner_flush_pages_recommendation(): Revise the logic for
the unlikely case cur_lsn < oldest_lsn.  The original logic would have
invoked af_get_pct_for_lsn() with a very large age value, which
would likely cause an overflow of the local variable lsn_age_factor,
and make pct_for_lsn a "random number".  Based on that value,
total_ratio would be normalized to something between 0.0 and 1.0.
Nothing extremely bad should have happened in this case;
the innodb_io_capacity_max should not be exceeded.
2025-05-28 14:44:43 +03:00
..
archive Merge 10.6 into 10.11 2024-06-27 10:26:09 +03:00
blackhole MDEV-34348: my_hash_get_key fixes 2024-11-23 08:14:22 -07:00
columnstore Merge branch '10.6' into 10.11 2025-01-30 11:55:13 +01:00
connect Merge 10.6 into 10.11 2025-05-26 08:10:47 +03:00
csv Merge 10.6 into 10.11 2024-11-29 13:43:17 +02:00
example Remove dates from all rdiff files 2025-01-05 16:40:11 +02:00
federated Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
federatedx Merge branch '10.6' into '10.11' 2025-04-16 03:34:40 +02:00
heap Merge 10.5 into 10.6 2025-01-20 09:57:37 +02:00
innobase MDEV-36886 log_t::get_lsn_approx() isn't lower bound 2025-05-28 14:44:43 +03:00
maria Merge 10.6 into 10.11 2025-05-26 08:10:47 +03:00
mroonga Merge 10.6 into 10.11 2025-05-26 08:10:47 +03:00
myisam Merge 10.6 into 10.11 2025-05-26 08:10:47 +03:00
myisammrg Merge 10.6 into 10.11 2025-01-08 12:51:26 +02:00
oqgraph Merge 10.6 into 10.11 2024-11-29 13:43:17 +02:00
perfschema Merge 10.6 into 10.11 2025-05-21 07:36:35 +03:00
rocksdb Merge 10.6 into 10.11 2025-05-21 07:36:35 +03:00
sequence MDEV-33746 Supply missing override markings 2024-06-20 11:32:13 -04:00
sphinx Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
spider Merge 10.6 into 10.11 2025-05-21 07:36:35 +03:00
test_sql_discovery Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00