WillyXJ / facileManager

A modular suite of web apps built with the sysadmin in mind.
www.facilemanager.com
GNU General Public License v2.0
84 stars 37 forks source link

[OTHER] Database tables in MyISAM format #607

Open ValeriiVozniuk opened 5 months ago

ValeriiVozniuk commented 5 months ago

Replace everything between stars with current version of your facileManager and module installations:
fM Version : 4.5.0 fmDNS Version : 5.3.3


(BUG | ISSUE) Expected Behavior: In multinode/replicated MySQL/MariaDB clusters all facileManager tables data is present on all database nodes

(BUG | ISSUE) Actual Behavior: All facileManager tables are present only on the node used during the setup

(BUG | ISSUE) Steps to reproduce:

  1. Deploy two nodes cluster with MariaDB Galera.
  2. Deploy facileManager using first node IP for the connection.
  3. Log into database on the second node, and do for example
    MariaDB [facileManager]> select * from fm_dns_options;
    ERROR 1146 (42S02): Table 'facileManager.fm_dns_options' doesn't exist

    This happens because for most tables in https://github.com/WillyXJ/facileManager/blob/master/server/fm-modules/facileManager/install.php#L225 MYISAM engine is used, and according to https://mariadb.com/kb/en/mariadb-galera-cluster-known-limitations/ "Currently replication works only with the InnoDB storage engine". Thus the question is: do you consider changing all tables format to InnoDB? Currently only logs and some of fmDNS module tables are in this format.

WillyXJ commented 5 months ago

Most tables utilize MyISAM as that was the default back when fM was first started. Since then, a few tables have been converted to INNODB for some of the features it provides. Moving all to INNODB can be added to the roadmap. I welcome feedback on the performance differences if you are willing to convert all tables to INNODB in your environment.

ValeriiVozniuk commented 5 months ago

I've converted all the tables into InnoDB in our environment, and run dump/restore to have them replicated to all nodes. So far I don't see much difference in DB load, but it may manifest later. I will keep an eye on it :)

ValeriiVozniuk commented 1 month ago

Just to update here, no issues since that conversion, all looks good with all tables in InnoDB format