[MDEV-28607] add option to mtr to start mariabackup under rr Created: 2022-05-18  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Backup, Tests
Fix Version/s: 10.4, 10.5, 10.6

Type: Task Priority: Major
Reporter: Vladislav Lesin Assignee: Vladislav Lesin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Adding such option would be useful for debug purposes. See suggested fix here: https://github.com/MariaDB/server/tree/10.6-MDEV-28607-rr-backup.



 Comments   
Comment by Sergei Golubchik [ 2022-05-20 ]

this should be implemented in My::Debugger and work for all debuggers and all tools ($MYSQL, etc)

Comment by Marko Mäkelä [ 2022-06-15 ]

There is one additional consideration for 10.8 and later releases. Quoting a comment in MDEV-14425:

An observation was made during testing: rr record mariadb-backup --backup cannot work reliably if the redo log file was opened via mmap(). The reason is that rr assumes that the mmap file contents may only be changed by the traced process(es). To avoid bogus failures while running backup under rr, there are a few solutions:

  • Build without libpmem: rm CMakeCache.txt; cmake -DCMAKE_DISABLE_FIND_PACKAGE_PMEM=1 /path/to/source
  • Place the server’s redo log somewhere else than /dev/shm or a PMEM device mounted with -o dax.
  • Patch log_t::attach() so that mmap() will not be attempted if srv_operation == SRV_OPERATION_BACKUP.
  • Implement server-side backup (MDEV-14992).

One more (probably impractical) alternative would be to trace both the server and the backup process in a single rr record process.

Generated at Thu Feb 08 10:02:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.