Commit f8a735d6 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

Merge branch '10.11' into mariadb-10.11.9

parents 0e8fb977 8da47741
MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=11 MYSQL_VERSION_MINOR=11
MYSQL_VERSION_PATCH=9 MYSQL_VERSION_PATCH=10
SERVER_MATURITY=stable SERVER_MATURITY=stable
...@@ -1042,13 +1042,19 @@ std::pair<lsn_t,byte*> log_t::append_prepare(size_t size, bool ex) noexcept ...@@ -1042,13 +1042,19 @@ std::pair<lsn_t,byte*> log_t::append_prepare(size_t size, bool ex) noexcept
size_t b{spin ? lock_lsn() : buf_free.load(std::memory_order_relaxed)}; size_t b{spin ? lock_lsn() : buf_free.load(std::memory_order_relaxed)};
write_to_buf++; write_to_buf++;
const lsn_t l{lsn.load(std::memory_order_relaxed)}, end_lsn{l + size}; lsn_t l{lsn.load(std::memory_order_relaxed)}, end_lsn{l + size};
if (UNIV_UNLIKELY(pmem if (UNIV_UNLIKELY(pmem
? (end_lsn - ? (end_lsn -
get_flushed_lsn(std::memory_order_relaxed)) > capacity() get_flushed_lsn(std::memory_order_relaxed)) > capacity()
: b + size >= buf_size)) : b + size >= buf_size))
{
b= append_prepare_wait<spin>(b, ex, l); b= append_prepare_wait<spin>(b, ex, l);
/* While flushing log, we had released the lsn lock and LSN could have
progressed in the meantime. */
l= lsn.load(std::memory_order_relaxed);
end_lsn= l + size;
}
size_t new_buf_free= b + size; size_t new_buf_free= b + size;
if (pmem && new_buf_free >= file_size) if (pmem && new_buf_free >= file_size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment