[Bug] cannot use database CR on galera clusters
Closed this issue · 3 comments
Documentation
- [ x I acknowledge that I have read the relevant documentation.
Describe the bug
node hangs when importing data
Expected behaviour
not hanging
Steps to reproduce the bug
- create a galera cluster
- create a database CR on this cluster
- import lots of data in this database like restoring a dump on the primary node.
The node hangs.
| 316533 | root | 127.0.0.1:49410 | test | Query | 514 | Waiting for certification | INSERT INTO `test1` VALUES ([...] | 0.000 |
| 316562 | root | 10.0.16.98:44474 | NULL | Query | 513 | Waiting to execute in isolation | CREATE DATABASE IF NOT EXISTS `test` CHARACTER SET = 'utf8mb4' COLLATE = 'utf8mb4_g | 0.000 |
It was due to locks, dbeaver adds locks event in "no locks" dump, I had to add --skip-add-locks
extra env.
When using a dump without locks, it works.
Hey there @vixns ! Thanks for bringing this up.
Indeed, Galera is incompatible with LOCK TABLES;
statements:
I encourage you to use the Backup
resource to take backups, it is a native mechanism that takes this into account, see the docs:
Hi @mmontes11
I was migrating a database from an old galera cluster, not managed by mariadb-operator, so It wasn't possible to use the Backup
CR
For newcomers like me, having a migrate unmanaged cluster to mariadb-operator
tutorial would be a great