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

AliSQL: [Feature] Issue#3 OPTMIZE AND BUGFIX LOG_WRITE_UP_TO

Details

    Description

      optimize log_write_up_to, port from upstream
      ===================
      Committer: Yasufumi Kinoshita
      Date: 2013-10-17 10:05:54 UTC
      Revision ID: yasufumi.kinoshita@oracle.com-20131017100554-aoqvm90a2a2wmdrz
      WL#7050 - InnoDB: Refactor redo log write code for better performance
       
      - This is rewrite of log_write_up_to() to improve its performance in case where
        innodb_flush_log_at_trx_commit = 2.
       
      In log_write_up_to():
       
      * Remove wait mode. We always wait with one exception. And that is when doing log
      sync from master thread. It makes that synchronous as well because that happens
      only once per second.
       
      * Because we only have one log group therefore we don't need two flush_events.
      * Remove unnecessary fields like written_to_some_lsn, written_to_all_lsn.
      * If only write is requested we don't have to acquire the log_sys::mutex after we
      release it. We currently do that only to do event handling but event handling is
      really only needed in case where flush is requested i.e.: a thread should be
      waiting on the event iff it is interested in flushing. Writes are serialized under
      log_sys::mutex.
       
      This patch was originally written by Inaam Rana.
       
      rb#2389 Approved by Sunny and Yasufumi
       
      ===========
       
      Adjustment for performance was done therough inherited rb#3373
       
      - optimize log_write_up_to() more
              * remove the second log_sys->mutex obtain also for "innodb_flush_log_at_trx_commit = 1" path
              * remove unnecessary ut_memcpy. (because log_group_write_buf() is protected by log_sys->mutex)
              * remove dirty-read from flush_to_disk=true case. (to avoid regression at some cases)
                (to keep current arbitration for write/fsync contention between log and data file)
              * fix wrong handling of O_DSYNC
      - revive log_buffer_sync_in_background(). (because it needs to be used)
       
      Bugfix:
      ===================
      bug#73109, skip redo log write when log_sys->buf_free is equal to log_sys->buf_next_to_write
      

      https://github.com/alibaba/AliSQL/commit/950300eceac957c8f97140f07595f6c568508de4

      Attachments

        Activity

          plinux, I think we have this patch in 10.2. Could you verify?

          svoj Sergey Vojtovich added a comment - plinux , I think we have this patch in 10.2. Could you verify?

          MariaDB 10.2 has this patch merged from MySQL.

          svoj Sergey Vojtovich added a comment - MariaDB 10.2 has this patch merged from MySQL.

          People

            plinux Lixun Peng
            svoj Sergey Vojtovich
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.