Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions storage/innobase/mtr/mtr0mtr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -916,25 +916,24 @@ ATTRIBUTE_COLD void log_t::append_prepare_wait(bool late, bool ex) noexcept
{
got_ex:
const uint64_t l= write_lsn_offset.load(std::memory_order_relaxed);
const lsn_t lsn{base_lsn.load(std::memory_order_relaxed)};
ut_d(lsn_t ll= lsn + (l & (WRITE_BACKOFF - 1)));
ut_ad(is_mmap()
? ll - get_flushed_lsn(std::memory_order_relaxed) < capacity()
: ll - write_lsn - ((write_size - 1) & (write_lsn - first_lsn)) <
buf_size);
const lsn_t lsn= base_lsn.load(std::memory_order_relaxed) +
(l & (WRITE_BACKOFF - 1));
waits++;
#ifdef HAVE_PMEM
const bool is_pmem{is_mmap()};
if (is_pmem)
persist(lsn + (l & (WRITE_BACKOFF - 1)));
{
ut_ad(lsn - get_flushed_lsn(std::memory_order_relaxed) < capacity());
persist(lsn);
}
#endif
latch.wr_unlock();
/* write_buf() or persist() will clear the WRITE_BACKOFF flag,
which our caller will recheck. */
#ifdef HAVE_PMEM
if (!is_pmem)
#endif
log_write_up_to(lsn + (l & (WRITE_BACKOFF - 1)), false);
log_write_up_to(lsn, false);
if (ex)
{
latch.wr_lock(SRW_LOCK_CALL);
Expand Down