feat(mysql_replication): add parallel workers

This commit is contained in:
Simon Cornet 2026-01-12 16:08:41 +01:00
commit 9fe60d8a5d

View file

@ -104,6 +104,8 @@ max_binlog_size = 100M
gtid_mode = ON gtid_mode = ON
enforce_gtid_consistency = ON enforce_gtid_consistency = ON
log_slave_updates = 1 log_slave_updates = 1
slave_parallel_type = 'LOGICAL_CLOCK'
slave_parallel_workers = 2
``` ```
Restart mariadb: `systemctl restart mariadb` Restart mariadb: `systemctl restart mariadb`
@ -142,8 +144,8 @@ mysql -u root -psupersecuresource -e "CREATE DATABASE IF NOT EXISTS databeast;"
mysqldump -u root -h source.example.com -psupersecuresource \ mysqldump -u root -h source.example.com -psupersecuresource \
--single-transaction \ --single-transaction \
--set-gtid-purged=ON \ --set-gtid-purged=ON \
--source-data=1 \ --quick \
--databases pms | mysql -u root -psupersecure --databases databeast | mysql -u root -psupersecure
``` ```
### Activate replication ### Activate replication