|
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.
|