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

buf_page_cleaner not getting signaled event if dirty_pct > innodb_max_dirty_pages_pct_lwm

Details

    Description

      • buf_page_cleaner is signaled when the pages are added to the flush list.
      • As part of the MDEV-27774 changes the logic to signal buf_page_cleaner
        accidentally got missed due to pass-by-value issue (expected pass-by-reference).
        [mtr_t::commit flow would signal page cleaner if there are modified
        blocks. The object that captured modified blocks was expected to get
        passed by reference but accidentally got passed by value and so
        page-cleaner thread was never signaled].

      [Non-availability of the flushing of-course has effect on performance as could be observed from the attached graph].

      Attachments

        Issue Links

          Activity

            Thank you! The following code indeed is unreachable because the object rb was being passed by value and not by reference, and only a copy of the mutable data member rb.modified was ever changed:

            diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc
            index f486c2fe0e7..10f1d6f2d19 100644
            --- a/storage/innobase/mtr/mtr0mtr.cc
            +++ b/storage/innobase/mtr/mtr0mtr.cc
            @@ -462,6 +462,7 @@ void mtr_t::commit()
             
                 if (rb.modified)
                 {
            +      ut_error;
                   mysql_mutex_lock(&buf_pool.flush_list_mutex);
                   buf_pool.flush_list_requests+= rb.modified;
                   buf_pool.page_cleaner_wakeup();
            

            marko Marko Mäkelä added a comment - Thank you! The following code indeed is unreachable because the object rb was being passed by value and not by reference, and only a copy of the mutable data member rb.modified was ever changed: diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc index f486c2fe0e7..10f1d6f2d19 100644 --- a/storage/innobase/mtr/mtr0mtr.cc +++ b/storage/innobase/mtr/mtr0mtr.cc @@ -462,6 +462,7 @@ void mtr_t::commit() if (rb.modified) { + ut_error; mysql_mutex_lock(&buf_pool.flush_list_mutex); buf_pool.flush_list_requests+= rb.modified; buf_pool.page_cleaner_wakeup();

            People

              marko Marko Mäkelä
              krunalbauskar Krunal Bauskar
              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.