Bug 256112 - [NEW PORT] databases/mariadb106-server: Multithreaded SQL database (server)
Summary: [NEW PORT] databases/mariadb106-server: Multithreaded SQL database (server)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernard Spil
URL: https://jira.mariadb.org/browse/MDEV-...
Keywords: feature, needs-patch
Depends on:
Blocks:
 
Reported: 2021-05-23 22:53 UTC by Vincent Milum Jr
Modified: 2022-02-21 15:28 UTC (History)
11 users (show)

See Also:
koobs: maintainer-feedback? (brnrd)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Milum Jr 2021-05-23 22:53:27 UTC
MariaDB just released version 10.6.1 BETA a couple days ago. I don't think we should have these beta versions in the main ports tree until they're deemed stable. HOWEVER, I do think these should still have some level of testing prior to their full release status, so we're not scrambling to adapt to all the new changes. As such, I've added mariadb106-client and mariadb106-server to my personal Ports collection that is publicly available.

The most notable changes are the Galera Cluster WSREP scripts have had a massive overhaul. As such, the 10.5 and earlier FreeBSD ports modifications to these files no longer applies. I've yet to test the new upstream WSREP scripts to see if they work.

So far, I've compiled the mariadb106-client and mariadb106-server port successfully and launched them both on my Aarch64 server under FreeBSD 14-CURRENT. But I've yet to issue any SQL queries other than checking server status.

More testing would be GREATLY appreciated!

My personal ports collections:
https://github.com/darkain/ports/tree/master/databases

For this to work, the base FreeBSD ports tree should also be installed.

You'll need to modify the following file:
/usr/ports/Mk/Uses/mysql.mk

And add the line:
MYSQL106m_LIBVER=   3

After that, everything should compile, install, and run!
Comment 1 Bernard Spil freebsd_committer 2021-05-24 18:49:54 UTC
Thanks Vincent! Much appreciated.

I'll provide feedback soon, prod me if I dont!
Comment 2 Vincent Milum Jr 2021-05-24 19:08:14 UTC
One quick hack that I did that'll probably need updating is in "patch-tpool_CMakeLists.txt"

tpool/CMakeLists.txt was modified heavily upstream. So for a quick fix, I just put the "ADD_DEFINITIONS(-fPIC)" line at the top of the file, rather than finding a true appropriate location for it.

Most of the other patches were left in unchanged. I dont recall off the top of my head, but one or two of the FreeBSD patches were added upstream, so those files have been removed from the port.

I'll probably start on WSREP testing sometime this week, as I deploy 10.6.1 on my personal test cluster.
Comment 3 Vincent Milum Jr 2021-05-26 19:19:48 UTC
I'm trying my first Galera SST today, and it isn't going well.

On the receiving node, it has started rsync and that looks good. But no other existing node in the cluster is in the donor state. The receiving node simply waits indefinitely.

I've not dug into logs yet, but at least for now I can indeed confirm WSREP is broken.
Comment 4 Vincent Milum Jr 2021-06-19 00:27:23 UTC
I've updated my port to 10.6.2, but I've yet to investigate the issues with with the Galera WSREP scripts.
Comment 5 Vincent Milum Jr 2021-07-07 05:20:24 UTC
10.6.3 is GA, and needs 1 additional patch since they have a broken return value in one file. I'll get that fixed up in my personal ports collection soon.

Also, Galera WSREP SST is still broken on FreeBSD, still have not had a chance to diagnose exactly why. I've created an upstream bug report for it: https://jira.mariadb.org/browse/MDEV-26101
Comment 6 Vincent Milum Jr 2021-07-08 03:59:42 UTC
Some more updates to the port in my personal repo.

AMD64:
All options except for Columnstore are now compiling.

Aarch64:
All options except for Columnstore and RocksDB are now compiling.

I previously worked in porting RocksDB for Aarch64 upstream a while ago, but I don't know how much of that work has been imported into the upstream MariaDB tree yet (last I checked, none of that work was imported). I'll have to pull up my notes again soon and merge them in as a ports patch set most likely.

For Columnstore, there are at least two issues right now.

1) There is a problem with one of the C++ templates, I think GCC vs LLVM handles it differently. This needs to be validated and hopefully a solution found.

2) There are now a bunch of Linuxisms for no good reason. They're using CGroups to query the number of CPU cores and free RAM, which can be queried otherwise. So this will need patching as well.

No fixes for Galera WSREP SST either as of yet. I've now opened this as a bug upstream:
https://jira.mariadb.org/browse/MDEV-26101
Comment 7 Vincent Milum Jr 2021-08-07 17:42:45 UTC
Updated for 10.6.4

At least ColumnStore is still a problem.

Default options compile, but I've not gone one by one to see if other options are broken still broken or not.
Comment 8 nbari 2021-08-13 21:14:37 UTC
Indeed SST is broken since mariadb105-server-10.5.11.txz, the latest working version is mariadb105-server-10.5.10.txz
Comment 9 Vincent Milum Jr 2021-12-22 17:02:32 UTC
A couple of notes:

The Galera issues AFAIK were fixed upstream since the last discussion here. 10.6.x should be good to add to Ports. Let's get this tested and added!

We now need to start prepping for both 10.7.x and 10.8.x at the same time! Yeah, I'm confused too, but there are two separate development branches now it appears. 

10.7.1 is listed as RC status:
https://mariadb.com/kb/en/changes-improvements-in-mariadb-107/

10.8.0 is now listed as a "development" branch:
https://mariadb.org/mariadb-10-8-0-preview-releases-now-available/
Comment 10 Daniel Gerzo freebsd_committer 2022-01-22 08:33:45 UTC
hello, are there any news?
Comment 11 Vincent Milum Jr 2022-02-10 02:02:47 UTC
The SST issue was fixed upstream a while ago. I've updated my personal ports collection for 10.6.6, and so far it seems good.

https://github.com/darkain/ports/tree/master/databases

I think this is good to get into the main FreeBSD ports tree
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2022-02-10 02:03:25 UTC
^Triage: Can we get a patch attached with QA confirmation
Comment 13 Bernard Spil freebsd_committer 2022-02-20 18:44:25 UTC
closed with fb3d4f1ede02f54c8d762dc575eb9ce13f00cdb0
Comment 14 VVD 2022-02-21 14:35:16 UTC
2 small fixes:

1) In databases/mariadb106-server/files/patch-scripts_mysql__config.sh:
-+embedded_libs="$embedded_libs -L/usr/local/lib "
++embedded_libs="$embedded_libs -L%%LOCALBASE%%/lib "

2) In databases/mariadb106-server/Makefile:
-CONFLICTS_INSTALL=     mariadb10[0-46-9]-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
+CONFLICTS_INSTALL=     mariadb10[0-57-9]-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \
Comment 15 Alex Hemp 2022-02-21 15:28:53 UTC
Small fix then building without SPIDER engine (missed %%SPIDER%% prefix for sample config)

--- databases/mariadb106-server/pkg-plist	2022-02-21 18:24:43.877387000 +0300
+++ databases/mariadb106-server/pkg-plist.old	2022-02-20 21:14:39.000000000 +0300
@@ -60,7 +60,7 @@
 %%S3%%%%ETCDIR%%/conf.d/s3.cnf
 @comment %%ETCDIR%%/server.cnf
 @sample %%ETCDIR%%/conf.d/server.cnf.sample
-%%SPIDER%%@sample %%ETCDIR%%/conf.d/spider.cnf.sample
+@sample %%ETCDIR%%/conf.d/spider.cnf.sample
 %%WSREP%%@sample %%ETCDIR%%/conf.d/wsrep.cnf.sample
 @comment %%ETCDIR%%/my.cnf
 @sample %%ETCDIR%%/user_map.conf.sample