User:DWalden (WMF)/Simulating database replication lag
- Setup a local docker wiki which uses a replica database, follow these instructions: MediaWiki-Docker/Configuration_recipes/Alternative_databases#MariaDB_(database_replication)
- Access the replica database (e.g. run
docker compose exec mariadb-replica mariadb -u root -p
(password ismain_root_password
)) - To set a 10 second replication lag, run the SQL commands:
STOP REPLICA; CHANGE MASTER TO MASTER_DELAY=10; START REPLICA;
- To remove the lag, run the commands:
STOP REPLICA; CHANGE MASTER TO MASTER_DELAY=0; START REPLICA;