Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLSTATE[42000] GET_LOCK support using Galera Cluster or MariaDB Galera Cluster #20752

Closed
aresxc opened this issue May 18, 2023 · 7 comments
Closed
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@aresxc
Copy link

aresxc commented May 18, 2023

I’m using MariaDB Galera Cluster and everything works fine, but in some circumstances, like navigating through reports show errors like:

QLSTATE[42000]: Syntax error or access violation: 1235 This version of MariaDB doesn't yet support 'GET_LOCK in cluster (WSREP_ON=ON)'.

  • Database server: MariaDB 10.11.3/mysql 15.1/Galera Cluster 26.4.14
  • Matomo Version: 4.14.2
  • PHP Version: 8.1.7
  • Server Operating System: Ubuntu 22.04 LTS

MariaDB multi-master cluster setup. Matomo Archive works. Almost everything works fine, but it happens more on segments.

This is weird because it's just about displaying the data, and not writing to the database.

@aresxc aresxc added Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels May 18, 2023
@bx80
Copy link
Contributor

bx80 commented May 18, 2023

HI @aresxc, thanks for reaching out.

We don't support Matomo running on Galera Cluster at this time because currently the GET_LOCK function is required for archiving.

If your Matomo installation is using browser triggered archiving or if you are viewing data for date ranges then archiving can be happening the background which would explain why you are seeing an error message.

There is an ongoing issue to improve support for distributed databases and also a an older experimental branch which avoids using GET_LOCK. Unfortunately I can't give you any indication of when support might be added to a production release.

@bx80 bx80 added answered For when a question was asked and we referred to forum or answered it. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels May 18, 2023
@bx80 bx80 closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2023
@jSML4ThWwBID69YC
Copy link

This is interesting. I've been running Matomo for over a year on Galera without issues. It's only since the recent update to MariaDB 10.6.13 that the errors have shown up.

The archiving itself does not seem to have any issues. I'm only seeing the sql errors displayed when navigating reports.

@manusfreedom
Copy link

This is interesting. I've been running Matomo for over a year on Galera without issues. It's only since the recent update to MariaDB 10.6.13 that the errors have shown up.

The archiving itself does not seem to have any issues. I'm only seeing the sql errors displayed when navigating reports.

Same here.

@manusfreedom
Copy link

manusfreedom commented Jun 2, 2023

I think I found the source and it's not related to Matomo but MariaDB:

[Revision #49ee18eb42](https://github.com/MariaDB/server/commit/49ee18eb42) 2023-01-27 10:40:07 +0200
[MDEV-30473](https://jira.mariadb.org/browse/MDEV-30473) : Do not allow GET_LOCK() / RELEASE_LOCK() in cluster
[Revision #696562ce55](https://github.com/MariaDB/server/commit/696562ce55) 2023-01-26 14:34:12 +0200
[MDEV-30473](https://jira.mariadb.org/browse/MDEV-30473) : Do not allow GET_LOCK() / RELEASE_LOCK() in cluster

We are not alone: https://jira.mariadb.org/browse/MDEV-31325

@jSML4ThWwBID69YC
Copy link

It's strange that Matomo has worked all this time even if GET_LOCK / RELEASE_LOCK technically did not.

@aresxc
Copy link
Author

aresxc commented Jun 8, 2023

Has been reverted in MariaDB 10.11.4.

MariaDB 10.11.4 Release Notes:

Revert "MDEV-30473 : Do not allow GET_LOCK() / RELEASE_LOCK() in cluster"

@manusfreedom
Copy link

Has been reverted in MariaDB 10.11.4.

MariaDB 10.11.4 Release Notes:

Revert "MDEV-30473 : Do not allow GET_LOCK() / RELEASE_LOCK() in cluster"

The main MariaDB versions have been reverted (10.6.14,...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

4 participants