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

Change buffer freed pages are not removed during slow shutdown

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • A shutdown with innodb_fast_shutdown=0 did not free cached change buffer pages.

    Description

      --source include/have_innodb.inc                                                
      --source include/not_embedded.inc                                               
      --source include/have_sequence.inc                                              
      CREATE TABLE t1(a INT AUTO_INCREMENT PRIMARY KEY, b char(1), c int,             
                      index(b))ENGINE=InnoDB STATS_PERSISTENT=0;                      
      SET GLOBAL innodb_limit_optimistic_insert_debug = 2;                            
      SET GLOBAL innodb_change_buffering_debug = 1;                                   
      SET GLOBAL innodb_change_buffering=all;                                         
      INSERT INTO t1 SELECT 0,'x',1 FROM seq_1_to_16384;                              
      SHOW ENGINE INNODB STATUS;                                                      
      DROP TABLE t1;                                                                  
      set global innodb_fast_shutdown=0;              
      --source include/shutdown_mysqld.inc
      

      Ran the innochecksum tool against ibdata1:

      ================PAGE TYPE SUMMARY==============                                 
      #PAGE_COUNT     PAGE_TYPE                                                       
      ===============================================                                 
            69        Index page                                                      
             0        Undo log page                                                   
             3        Inode page                                                      
             1        Insert buffer free list page                                    
           445        Freshly allocated page                                          
             1        Insert buffer bitmap                                            
           232        System page                                                     
             1        Transaction system page                                         
             2        File Space Header                                               
             0        Extent descriptor page                                          
             0        BLOB page                                                       
             0        Compressed BLOB page                                            
             0        Page compressed page                                            
             0        Page compressed encrypted page                                  
             0        Other type of page 
      

      Indexwise information:

      index_id        #pages          #leaf_pages     #recs_per_page  #bytes_per_page 
      1               2               2               6               478             
      2               2               2               30              1995            
      3               2               2               11              810             
      4               2               2               19              859             
      5               2               2               6               208             
      11              1               1               0               0               
      12              1               1               0               0               
      13              1               1               0               0               
      14              1               1               0               0               
      15              1               1               0               0               
      23              51              51              2               56              
      -4294967296             3               3               1               42 
      

      Encountered page 308, 309 as change buffer pages. Problem is that
      InnoDB fails to remove the freed page from freed list of change buffer.
      It should free the page and return back to tablespace.

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            thiru Thirunarayanan Balathandayuthapani
            Thirunarayanan Balathandayuthapani Thirunarayanan Balathandayuthapani
            Votes:
            1 Vote for this issue
            Watchers:
            3 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.