@quba opened this Issue on June 22nd 2015 Contributor

Please see this line:
https://github.com/piwik/piwik/blob/master/config/global.ini.php#L22

  • it's OK to set this value by default to InnoDB during the installation process (so type in config.php.ini will be set to InnoDB) - it's always better than using MyISAM for most of the users,
  • maybe during installation process it should be possible to choose DB engine, e.g. when there's a combination like MariaDB + TokuDB? But I guess it won't be possible to get the list without connecting to the DB. In addition installation process should be easy and fast.
  • if DB engine is not set in config.ini.php, Piwik should fallback to default DB engine - default-storage-engine setting in DB configuration file (my.cnf) - this means no ENGINE = XXXXX in CREATE TABLE queries. Currently it falls back to type=InnoDB which is set in global.php.ini
@tsteur commented on June 24th 2015 Owner

I made some changes but I'm not sure if I understand this issue

@quba commented on June 24th 2015 Contributor

Thanks @tsteur !
Can we somehow check if TokuDB is available? What if only MyISAM is available (I don't know if such case is possible)?

https://github.com/piwik/piwik/blob/master/config/global.ini.php#L22
This one shouldn't be hardcoded to InnoDB in my opinion. Better way would be to fallback to default-storage-engine. @mattab do you have any comments here?

@tsteur commented on June 24th 2015 Owner

This one shouldn't be hardcoded to InnoDB in my opinion. Better way would be to fallback to default-storage-engine

I don't understand the problem. It's basically the same with a different name or not?

Can we somehow check if TokuDB is available? What if only MyISAM is available (I don't know if such case is possible)?

I don't know how to do this without introducing a new step but then the tables are already created (and we have to run alter table engine=...). We need a database connection to get the available engines. I will delete my commit again as this seems like quite a bit of work.

Would it be maybe better to have a command to change the engine of all tables? Such a command should run very quickly after a fresh installation of Piwik

@quba commented on June 24th 2015 Contributor

I've just updated ticket description. Maybe it's more clear now.

@mattab commented on June 24th 2015 Owner

I don't think it's safe to use the default mysql engine. For example what if the default engine is set to an engine that does not support features we need? it is Piwik job to force users to use only engines that will work fine (Innodb or TokuDB).

If our goal is to let users install on TokuDB the current solution with new select field, should do the trick?

@quba commented on June 24th 2015 Contributor

That's good point. There are also other compatible engines like XtraDB. Not sure how to proceed.

@mattab commented on June 24th 2015 Owner

Our goal is to let users install Piwik on TokuDB. I would change this issue description to "Let users install Piwik on TokuDB database" and then close it as done?

@mattab commented on June 24th 2015 Owner

Note to self: test what happens when installing selecting TokuDB and TokuDB is actually not available. Does it fail gracefully, show the form, and then let me select Innodb?

@mattab commented on June 25th 2015 Owner

Final decision:

  • we don't show the field during the installer to keep installer as clean as possible
  • it will be possible to set the database engine in Piwik Enterprise with this change (from 2.14.0)
@mattab commented on June 25th 2015 Owner

New FAQ published: How do I install Piwik using TokuDB table engine in a Mysql or MariaDB database?

Updated FAQ: How do I use another database like Postgresql, SQLite, Oracle? Will you support Nosql databases like Hadoop, Mongodb? to link to it

(Note: I didn't actually test it, but I tested with Myisam/Innodb which worked so I assume tokuDB will work too. if not, we will fix it next release after feedback from Piwik Enterprise team)

This Issue was closed on June 25th 2015
Powered by GitHub Issue Mirror