Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Replication Friendliness #14719
Tonight One of our server started to lag due to matomo starting a
A quick solution is to iterate over and perform 1 query per table, It will still hang on the bigger one, but is a much more reasonable delay.
Another solution can be to also set a different
So those maintenance job will run on a side thread, and real time ingestion will keep running.
Code wise is probably just a few lines.
This should be an option that will be enabled (if needed).
If you are interested In this second proposal I can try to write some code example.
SET SESSION gtid_domain_id=XYZ;
Thank @tsteur I will give a look on this option.
Verified no, but as a general rule the replication hang until the currunt query beeing replicated is not finished.
@RoyBellingan I think a fix be quite easy to simply iterate over an array here https://github.com/matomo-org/matomo/blob/3.12.0-b1/core/Db.php#L459 and execute each optimize table individually.