MariaDB support

Hi devs,

Right now we don’t officially support MariaDB, see https://dev.xwiki.org/xwiki/bin/view/Community/SupportStrategy/DatabaseSupportStrategy

Thomas mentioned yesterday that the Debian packaging will use MariaDB on some debian OSes. However that is not enough to say we support it IMO.

For me supporting means that we test for it in our CI. So if we want to support MariaDB properly and put it in the supported DB page we should finish adding support for it in our XWiki Docker Test framework and use it in https://github.com/xwiki/xwiki-jenkins-pipeline/blob/bcec03027b2a3f9ed64ba964fb07cfd5f0f1623b/vars/dockerConfigurations.groovy

So I propose that we do that. I’ll try to find some time to work on it but if someone else wants to do it, it’s fine too :wink:

Note that supporting it has a cost since it’s another DB to support and this means running all our tests on it which means using more CI Agent CPUs and time.

So I’d like to make sure we’re ok with that. Opinions?

PS: FTM I’ve added MariaDB in the unsupported section of https://dev.xwiki.org/xwiki/bin/view/Community/SupportStrategy/DatabaseSupportStrategy

+1

Because of Debian (and most Linux distributions I think) decision to use MariaDB as mysql “implementation” more and more people end up using it so better support it officially.

+1

Thanks,
Marius

+1

+1, same as Thomas mentioned re Debian.

Our main/recommended distribution is currently Debian and it’s not that trivial to replace the MariaDB package that comes with it with Oracle’s MySQL. If you upgrade from an older version of Debian you might also end up with MariaDB after an OS upgrade without realizing it.

Some comments/questions:

  1. As of today, we have updated https://dev.xwiki.org/xwiki/bin/view/Community/SupportStrategy/DatabaseSupportStrategy a bit ahead of time to reflect adding support for MariaDB (even though we currently don’t test for it, see https://github.com/xwiki/xwiki-jenkins-pipeline/blob/master/vars/dockerConfigurations.groovy#L157)
  2. We have also unvoluntarily removed support for MySQL. We’re currently supporting versions 5.5 and 5.7 of MySQL (see https://github.com/xwiki/xwiki-jenkins-pipeline/blob/master/vars/dockerConfigurations.groovy#L157). So the question is: Should we drop support for MySQL if we add support for MariaDB?

WDYT?

So I guess we need to add a configuration with MariaDB, shouldn’t be really difficult, there’s an official docker image (https://hub.docker.com/_/mariadb/) and no doubt TC support it. We “just” need to chose the version we test.

So it’s really more a “feeling” answer, since I think I miss information about the usage of MySQL compared to MariaDB, but on my side I know it took me a bit of time to integrate to use MariaDB over MySQL on my machines, and we document at several places about using MySQL including in our docker images etc.
So I’m not sure I’d be in favor of dropping right away the support for it: maybe plan a schedule for dropping support on the long term, sure, but doing it as soon as we add support for MariaDB seems prematurate for me.

Yep, I know, I’ve testing it for a while now, see https://github.com/xwiki/xwiki-platform/blob/eaced75f5a08b4131e36504fb5f6c71d6b392fa8/xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-docker/src/main/java/org/xwiki/test/docker/internal/junit5/database/DatabaseContainerExecutor.java#L181

For me it all depends on how similar they are. AFAIK they’re pretty close (see also https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/#incompatibilities-between-currently-supported-mariadb-versions-and-mysql).

So one strategy could be that we only test on MariaDB, considering that this is also testing MySQL de facto, wait for someone to raise a problem on MySQL and if that happens then add back specific testing for MySQL.

An alternative, to be extra safe, is to run on the latest corresponding MySQL version once every week or once every month for ex. By latest corresponding I mean https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/#drop-in-compatibility-of-specific-mariadb-versions

WDYT?

Actually for the MySQL versions we want to support now that we support MariaDB I see 2 main options:

  1. Support the MySQL versions for which MariaDB is a drop-in replacement.

For example today we want to support MariaDB 10.1 and 10.3 (see https://packages.debian.org/search?keywords=mariadb-server).

Based on that and on https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/#drop-in-compatibility-of-specific-mariadb-versions, it would mean supporting MySQL 5.6 and 5.7.

However as mentioned on https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/#drop-in-compatibility-of-specific-mariadb-versions the differences between MySQL and MariaDB are increasing at each version so this strategy will work less and less.

  1. Define our MySQL support not based on what’s avail in Debian but on a specific rule such as: we support the latest GA of MySQL (which is MySQL 8.0.20 today, see https://dev.mysql.com/downloads/mysql/).

If we want to be even nicer, we could say that we support the last 2 GAs but that feels a lot to me. The previous GA is currently 5.7.30.

WDYT?

Thanks

So after checking the market share and especially https://scalegrid.io/blog/2019-open-source-database-report-top-databases-public-cloud-vs-on-premise-polyglot-persistence/ I think we shoudl reverse it:

  • We need to continue support MySQL since it’s way more used than MariaDB ATM. 30% market share vs 10%.
  • We should add MariaDB since because of the Debian and linux distributions move to use it as default.

In light of this, I’m changing my proposal to the opposite:

  • “latest” job: check MySQL GA and GA-1.
  • “all” job: check MariaDB

Rationale for mariaDB in “all” job and not in “latest” one:

  • “only” 10% market share ATM
  • having too many DB is very build intensive and plays a lot on our build duration, we need to keep it to the minimum

EDIT: I’ve also updated https://dev.xwiki.org/xwiki/bin/view/Community/SupportStrategy/DatabaseSupportStrategy accordingly. I’ll keep updating it and maintaining it in sync with what we decide in this thread.

Actually the strategies we have been following in the past is to not support the latest GA but the 2 previous ones, so for MySQL it would mean GA-2 and GA-1.

So I’m proposing to do that for MySQL too.

See new proposal at https://forum.xwiki.org/t/new-database-and-servlet-container-support-strategy/6934

One thing I just noticed: contrary to the others (and to what they usually do) Ubuntu decided to not follow Debian on this and install MySQL 8 by default (i.e. when you install default-mysql-server). Current LTS (20.04) provide MySQL 8.0.20 and previous one (18.04) provides 5.7.30. See https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=mysql-server&searchon=names.

ok thanks for the info Thomas. That matches nicely with our strategy so it’s cool :slight_smile: