Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-27916

InnoDB ignores log write errors

    XMLWordPrintable

Details

    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.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.