We are using since some months ago, MariaDB Galera Cluster to support our piwik instalation.
Seems that everything work just fine except the archive part. Some queries are using LOCK TABLES and some other - I think that must be the OPTIMIZE ones - are causing METADATA LOCK which none of them are supported by MariaDB Galera Cluster: LOCK TABLES and UNLOCK TABLES - MariaDB Knowledge Base or MariaDB Galera Cluster - Known Limitations - MariaDB Knowledge Base.
Why piwik is using LOCK on it’s queries?
My question is if is possible to revoke LOCK TABLES permissions for piwik database user and what are the expected consequences of this actions on piwik.
P.S. - the METADATA LOCK and the OPTIMIZE TABLE happens but it should as you stated that with all piwik tables being InnoDB the OPTIMIZE is not run.