1. 21 Jun, 2022 8 commits
    • Marko Mäkelä's avatar
      Merge 10.9 into 10.10 · 9810a4ec
      Marko Mäkelä authored
      9810a4ec
    • Marko Mäkelä's avatar
      Merge 10.8 into 10.9 · 707f2aa2
      Marko Mäkelä authored
      707f2aa2
    • Marko Mäkelä's avatar
      Merge 10.7 into 10.8 · 54ac356d
      Marko Mäkelä authored
      54ac356d
    • Marko Mäkelä's avatar
      Merge 10.6 into 10.7 · 6680fd8d
      Marko Mäkelä authored
      6680fd8d
    • Marko Mäkelä's avatar
      MDEV-28836: Memory alignment cleanup · 37946731
      Marko Mäkelä authored
      Table_cache_instance: Define the structure aligned at
      the CPU cache line, and remove a pad[] data member.
      Krunal Bauskar reported this to improve performance on ARMv8.
      
      aligned_malloc(): Wrapper for the Microsoft _aligned_malloc()
      and the ISO/IEC 9899:2011 <stdlib.h> aligned_alloc().
      Note: The parameters are in the Microsoft order (size, alignment),
      opposite of aligned_alloc(alignment, size).
      Note: The standard defines that size must be an integer multiple
      of alignment. It is enforced by AddressSanitizer but not by GNU libc
      on Linux.
      
      aligned_free(): Wrapper for the Microsoft _aligned_free() and
      the standard free().
      
      HAVE_ALIGNED_ALLOC: A new test. Unfortunately, support for
      aligned_alloc() may still be missing on some platforms.
      We will fall back to posix_memalign() for those cases.
      
      HAVE_MEMALIGN: Remove, along with any use of the nonstandard memalign().
      
      PFS_ALIGNEMENT (sic): Removed; we will use CPU_LEVEL1_DCACHE_LINESIZE.
      
      PFS_ALIGNED: Defined using the C++11 keyword alignas.
      
      buf_pool_t::page_hash_table::create(),
      lock_sys_t::hash_table::create():
      lock_sys_t::hash_table::resize(): Pad the allocation size to an
      integer multiple of the alignment.
      
      Reviewed by: Vladislav Vaintroub
      37946731
    • Marko Mäkelä's avatar
      MDEV-28870 InnoDB: Missing FILE_CREATE, FILE_DELETE or FILE_MODIFY before FILE_CHECKPOINT · 2e43af69
      Marko Mäkelä authored
      There was a race condition between log_checkpoint_low() and
      deleting or renaming data files. The scenario is as follows:
      
      1. The buffer pool does not contain dirty pages.
      2. A FILE_DELETE or FILE_RENAME record is written.
      3. The checkpoint LSN will be moved ahead of the write of the record.
      4. The server is killed before the file is actually renamed or deleted.
      
      We will prevent this race condition by ensuring that a log checkpoint
      cannot occur between the durable write and the file system operation:
      
      1. Durably write the FILE_DELETE or FILE_RENAME record.
      2. Perform the file system operation.
      3. Allow any log checkpoint to proceed.
      
      mtr_t::commit_file(): Implement the DELETE or RENAME logic.
      
      fil_delete_tablespace(): Delegate some of the logic to
      mtr_t::commit_file().
      
      fil_space_t::rename(): Delegate some logic to mtr_t::commit_file().
      Remove the debug injection point fil_rename_tablespace_failure_2
      because we do test RENAME failures without any debug injection.
      
      fil_name_write_rename_low(), fil_name_write_rename(): Remove.
      
      Tested by Matthias Leich
      2e43af69
    • Marko Mäkelä's avatar
      MDEV-28845 fixup: Prevent an infinite loop · 55f02c24
      Marko Mäkelä authored
      buf_page_create_low(): Before retrying, release the exclusive page latch
      in order to prevent an infinite loop in buf_pool_t::corrupted_evict().
      55f02c24
    • Marko Mäkelä's avatar
      MDEV-28782 fixup: ./mtr --embedded · 3b662c6e
      Marko Mäkelä authored
      3b662c6e
  2. 20 Jun, 2022 5 commits
  3. 19 Jun, 2022 1 commit
  4. 18 Jun, 2022 1 commit
  5. 17 Jun, 2022 5 commits
  6. 16 Jun, 2022 10 commits
  7. 15 Jun, 2022 6 commits
  8. 14 Jun, 2022 4 commits
    • Marko Mäkelä's avatar
      MDEV-28766: SET GLOBAL innodb_log_file_buffering · 4c0cd953
      Marko Mäkelä authored
      In commit c4c88307 (MDEV-28111) we disabled
      the file system cache on the InnoDB write-ahead log file (ib_logfile0)
      by default on Linux.
      
      It turns out that especially with innodb_flush_trx_log_at_commit=2,
      writing to the log via the file system cache typically improves throughput,
      especially on slow storage or at a small number of concurrent transactions.
      For other values of innodb_flush_log_at_trx_commit, direct writes were
      observed to be mostly but not always faster. Whether it pays off to
      disable the file system cache on the log may depend on the type of storage,
      the workload, and the operating system kernel version.
      
      On Linux and Microsoft Windows, we will introduce the settable Boolean
      global variable innodb_log_file_buffering that indicates whether the
      file system cache on the redo log file is enabled. The default value is
      innodb_log_file_buffering=OFF. If the server is started up with
      innodb_flush_log_at_trx_commit=2, the value will be changed to
      innodb_log_file_buffering=ON.
      
      When a persistent memory interface is being used for the log,
      the value cannot be changed from innodb_log_file_buffering=OFF.
      On Linux, when the physical block size cannot be determined
      to be a power of 2 between 64 and 4096 bytes, the file system cache
      cannot be disabled, and innodb_log_file_buffering=ON cannot be changed.
      
      Server log messages will indicate whether the file system cache is
      enabled for the redo log:
      
      [Note] InnoDB: Buffered log writes (block size=512 bytes)
      [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
      
      After this change, the startup parameter innodb_flush_method will no
      longer control whether O_DIRECT will be set on the redo log on Linux.
      
      On other operating systems that support O_DIRECT, no interface has been
      implemented for controlling the file system cache for the redo log.
      The innodb_flush_method values O_DIRECT, O_DIRECT_NO_FSYNC, O_DSYNC
      will enable O_DIRECT for data files, not the log.
      
      Tested by: Matthias Leich, Axel Schwenke
      4c0cd953
    • Marko Mäkelä's avatar
      Merge 10.7 into 10.8 · 813986a6
      Marko Mäkelä authored
      813986a6
    • Marko Mäkelä's avatar
      Merge 10.6 into 10.7 · 42d3a7b6
      Marko Mäkelä authored
      42d3a7b6
    • Marko Mäkelä's avatar
      MDEV-28840 innodb_undo_log_truncate is not crash-safe · 6c82ab4f
      Marko Mäkelä authored
      trx_purge_free_segment(): Do mark that the block will be modified.
      
      It seems possible that this regression was introduced by the
      changes to the page-freeing logic
      in commit 4179f93d (MDEV-18976).
      
      Tested by: Matthias Leich
      6c82ab4f