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

SET GLOBAL innodb_max_dirty_pages_pct=0 occasionally fails to trigger writes

    XMLWordPrintable

Details

    Description

      The test innodb.page_cleaner would occasionally time out like this:

      @@ -2,6 +2,11 @@
       SET @save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm;
       SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0;
       SET GLOBAL innodb_max_dirty_pages_pct=0.0;
      +Timeout in wait_condition.inc for SELECT variable_value = 0
      +FROM information_schema.global_status
      +WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY'
      +Id	User	Host	db	Command	Time	State	Info	Progress
      +28	root	localhost	test	Query	0	starting	show full processlist	0.000
       SET GLOBAL innodb_max_dirty_pages_pct=90.0;
       CREATE TABLE t ENGINE=InnoDB SELECT * FROM seq_1_to_10000;
       SELECT variable_value>0 FROM information_schema.global_status
      

      The reason is that we fail to wake up the buf_pool_page_cleaner from pthread_cond_wait() when innodb_max_dirty_pages_pct is assigned. Invoking pthread_cond_signal() on the condition variable is not enough, not even while holding buf_pool.flush_list_mutex.

      Invoking buf_pool.page_cleaner_wakeup() seems to do the trick. With that fix, the test will execute several hundred times without failures.

      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.