mariadb/extra/mariabackup
Marko Mäkelä c380e16597 MDEV-38833 Suboptimal or dead code at server startup
The InnoDB bootstrap is creating unnecessary log checkpoints
and even invalidating the buffer pool for no reason, making it
necessary to read pages into the buffer pool during bootstrap.

Furthermore, the page cleaner thread attempts to invoke
recv_sys.apply(true), even though most calls were unreachable
starting with commit 685d958e38 (MDEV-14425)
if not earlier.

buf_flush_sync(): Replaced with buf_flush_sync_batch(LSN_MAX),
possibly preceded by recv_sys.apply(true).

buf_pool_t::assert_all_freed(): Assert that buf_pool.mutex is
being held by the caller.

buf_dblwr_t::create(): Evict each doublewrite buffer pool page
immediately from the buffer pool, so that there will be no need
to invoke buf_pool_invalidate(). Also, remove the unnecessary
call to buf_flush_wait_flushed(); there is nothing special about
the doublewrite buffer creation ever since
commit e2c63a7062 (MDEV-38595)
made the redo logging actually crash-safe.

buf_pool_invalidate(): Moved to the same compilation unit with
the only remaining caller, recv_sys_t::apply().

srv_start(): Do not invoke buf_flush_sync(). We already created
an initial checkpoint in log_t::create(lsn_t), and we will create
the final one during shutdown. Together with the simplification of
buf_dblwr_t::create(), this should noticeably speed up the
server bootstrap. Also, simplify the log file rebuild by extending
the critical section of log_sys.latch and buf_pool.flush_list_mutex.

create_log_file(): Assert and assume that both log_sys.latch and
buf_pool.flush_list_mutex were acquired by the caller.
This prevents any race condition with buf_flush_page_cleaner()
when the log is being rebuilt.

srv_prepare_to_delete_redo_log_file(): Invoke recv_sys.apply(true)
before invoking buf_flush_sync_batch(LSN_MAX).
Remove a redundant call to fil_system.sys_space->open(false)
because srv_start() must already have successfully invoked that
in order for us to reach this code path. Remove some duplicated
assertions as well as a redundant call to log_write_up_to() from
the end. If we crash while rebuilding a latest_format log file,
the subsequent startup will perform crash recovery normally.
This avoids a redundant write to the old log.
2026-02-18 10:29:33 +02:00
..
quicklz MDEV-9566 Add Percona Xtrabackup 2.3.7 2017-04-27 19:12:39 +02:00
aria_backup_client.cc MDEV-38246 aria_read index failed on encrypted database during backup 2026-01-29 20:53:42 +01:00
aria_backup_client.h MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
backup_copy.cc MDEV-38041: MariaBackup fails during rollback of inplace FTS alter table 2025-11-27 11:52:01 +05:30
backup_copy.h MDEV-22250 InnoDB: Failing assertion: opt_no_lock during mariabackup --backup 2025-07-14 16:30:06 +03:00
backup_debug.h MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
backup_mysql.cc MDEV-38246 aria_read index failed on encrypted database during backup 2026-01-29 20:53:42 +01:00
backup_mysql.h Fixed a LOT of memory leaks in mariabackup 2025-09-04 18:08:39 +03:00
backup_wsrep.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
CMakeLists.txt MDEV-36234: Add innodb_linux_aio 2025-06-23 13:51:52 +03:00
common.h MDEV-33379 innodb_log_file_buffering=OFF causes corruption on bcachefs 2024-02-20 11:22:45 +02:00
common_engine.cc MDEV-36437 mariabackup - confusing error message when running out of file handles with partitioned MyISAM 2025-03-31 17:57:35 +02:00
common_engine.h MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
datasink.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
datasink.h MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
ddl_log.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
ddl_log.h MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
ds_buffer.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
ds_buffer.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
ds_compress.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
ds_compress.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
ds_local.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
ds_local.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
ds_stdout.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
ds_stdout.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
ds_tmpfile.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
ds_tmpfile.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
ds_xbstream.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
ds_xbstream.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
encryption_plugin.cc MDEV-38246 aria_read index failed on encrypted database during backup 2026-01-29 20:53:42 +01:00
encryption_plugin.h MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
fil_cur.cc MDEV-37019 MSAN_STAT_WORKAROUND macro remove 2025-06-18 16:46:21 +10:00
fil_cur.h Merge 10.6 into 10.11 2025-05-21 07:36:35 +03:00
innobackupex.cc MDEV-29445: Reimplement SET GLOBAL innodb_buffer_pool_size 2025-03-26 17:05:44 +02:00
innobackupex.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
read_filt.cc Cleanup: Remove changed_pages_bitmap 2024-02-12 17:01:35 +02:00
read_filt.h Cleanup: Remove changed_pages_bitmap 2024-02-12 17:01:35 +02:00
thread_pool.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
thread_pool.h MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
write_filt.cc MDEV-36253 Redundant check in wf_incremental_process() 2025-03-10 11:48:18 +05:30
write_filt.h MDEV-31039 mariadb-backup: remove global variables ds_data and ds_meta 2023-04-12 15:14:03 +04:00
wsrep.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
xb_regex.h MDEV-14024 PCRE2. 2019-12-21 10:34:02 +01:00
xbcloud.cc Fix few vulnerabilities found by Cppcheck 2023-03-02 14:38:24 +11:00
xbstream.cc Merge 10.6 into 10.11 2024-11-29 13:43:17 +02:00
xbstream.h MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
xbstream_read.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
xbstream_write.cc MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00
xtrabackup.cc MDEV-38833 Suboptimal or dead code at server startup 2026-02-18 10:29:33 +02:00
xtrabackup.h MDEV-32932 Port backup features from ES 2024-02-27 20:55:54 +02:00