[MDEV-27916] InnoDB ignores log write errors Created: 2022-02-22  Updated: 2022-02-22  Resolved: 2022-02-22

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.8.1
Fix Version/s: 10.9.0, 10.8.3

Type: Bug Priority: Blocker
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: corruption, regression-10.8

Issue Links:
Problem/Incident
is caused by MDEV-14425 Change the InnoDB redo log format to ... Closed
Relates
relates to MDEV-26603 asynchronous redo log write Stalled

 Description   

In MDEV-14425, a check that log writes succeed was inadvertently removed. Before that change, the code looked like this:

void log_t::file::write(os_offset_t offset, span<byte> buf)
{
  srv_stats.os_log_pending_writes.inc();
  if (const dberr_t err= fd.write(offset, buf))
    ib::fatal() << "write(" << fd.get_path() << ") returned " << err;
  srv_stats.os_log_pending_writes.dec();
  srv_stats.os_log_written.add(buf.size());
  srv_stats.log_writes.inc();
  log_sys.n_log_ios++;
}

The counters were removed or relocated on purpose, but the error handling must be retained. If a log write fails, the only other reasonable alternative to crashing might be to switch to read-only mode.


Generated at Thu Feb 08 09:56:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.