Testing Cluster with Mediawiki

I’ve succesfully installed Mediawiki 1.31 in Ubuntu 16.04 using a 3 machine percona mysql cluster (5.7.22).
The cluster seems to be working ok, but when installation wizard is about to finish, this error appears.

No se pudo insertar la página principal: A database query error has occurred. Did you forget to run your application’s database schema updater after upgrading? Query: SELECT GET_LOCK(‘695f25141b5213ec078ceed7dbde8264bc651753’, 30) AS lockstatus Function: ApiStashEdit::checkCache Error: 1105 Percona-XtraDB-Cluster prohibits use of GET_LOCK with pxc_strict_mode = ENFORCING (10.0.2.80)

I’ve reported this on Mediawiki site and following recommendations of Bawolff I put pxc-strict-mode=PERMISSIVE for the last part of the installation and everything was ok.

[url]https://www.mediawiki.org/wiki/Topic:Uhmprgtvts7q5972[/url]

I would like to know if someone here has had some experience on installing Mediawiki using this cluster. Can anybody say if Mediawiki installation is compatible with Percona xtradb cluster?

Maybe there are other situations (extension installation which modifies database, upgrading,…) when get lock or other Percona limitation is needed.

Thanks!

Juanjo

Hello Juanjo,

Indeed the explicit table locks like GET_LOCK, are not supported by Galera replication and in some cases may lead to unexpected issues, like cluster stalls.
This is explained in Galera upstream documentation:
[URL]http://galeracluster.com/documentation-webpages/limitations.html#table-locking[/URL]
and the PXC Strict Mode Percona introduced helps to avoid such unsafe things by either blocking them or logging warnings (in permissive mode). More details: [URL=“Redirecting”]Redirecting

I understand there are some places in MediaWiki code that still use GET_LOCK. In that case, it would be best if such occurrences could be removed or replaced with other solution.
Please note that such code change would allow not only MediaWiki use with PXC but also with MySQL InnoDB Cluster (Group Replication) - check the similar limitations notes here:
[URL]https://dev.mysql.com/doc/refman/5.7/en/group-replication-limitations.html[/URL]

Till then, to minimize the chance for issues, please use only one PXC node as writer.