-
Notifications
You must be signed in to change notification settings - Fork 101
MySQL CNID Backend: improve charset performance, TCP performance, and test container config #2649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
0369503 to
28f3dbd
Compare
…ner config - Enable TCP_NODELAY for MySQL/MariaDB TCP connections to reduce query latency - Reduce connection/read/write timeouts from 600s to 30s - Set UTF-8 charset (utf8mb4) at connection time for UTF-8 volumes (avoid repeated dynamic detection overhead) - Add improved logging for connection info and table creation - Enhanced Docker entrypoint to support MySQL/MariaDB testing via TCP and Socket - Add mariadb package to Alpine testsuite Dockerfile - Update afp.conf documentation for MySQL backend options
28f3dbd to
8d4df17
Compare
|
| fi | ||
|
|
||
| echo "*** MySQL CNID backend configured: host='$AFP_CNID_SQL_HOST', user='$AFP_CNID_SQL_USER', db='$AFP_CNID_SQL_DB'" | ||
| # Start MariaDB server if using localhost or 127.0.0.1 - for container-local database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do I understand it correctly that this is a local mariadb configuration strictly for testing Unix sockets in a container, or is it something that someone could reasonably choose for a production container deployment too?
depending on the answer, I may have follow-up suggestions. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, both!
It was setup to support setting the MySQL host to "localhost" (test Unix socket), or "127.0.0.1" (test TCP without Nagle).
But yes, you could add this to the production container with "localhost" and then it would be production ready
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then my suggestion would be that we test this configuration in the github workflow, in an additional job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, yes agreed. I'll finish the clean up on this tonight
| mac charset = ${AFP_MAC_CHARSET:-MAC_ROMAN} | ||
| unix charset = ${AFP_UNIX_CHARSET:-UTF8} | ||
| vol charset = ${AFP_VOL_CHARSET:-UTF8} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these could be useful for the general public, so please document them in distrib/docker/README.md !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
Added as I needed to test the charset used with MySQL.
Also want to debug why everything but MacRoman reports as an invalid charset for the Mac charset.
| > On Windows systems, TCP is always used regardless of this setting since | ||
| > Unix sockets are not supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since netatalk doesn't run on Windows, I wonder if it's redundant to describe this caveat?
| LOG(log_info, logtype_cnid, | ||
| "MySQL CNID backend: host='%s', user='%s', database='%s'", | ||
| obj->options.cnid_mysql_host ? obj->options.cnid_mysql_host : "(default)", | ||
| obj->options.cnid_mysql_user ? obj->options.cnid_mysql_user : "(none)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it can be seen as security sensitive to log usernames?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Logging is done safely and with the correct permissions, but yes I agree, I'll remove



MySQL CNID Backend: improve charset performance, TCP performance, and test container config