Skip to content
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

Issue 309 - Adding transaction isolation and default to read committed #311

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions mariadb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ RUN --mount=type=cache,id=mariadb-apk-${TARGETARCH},sharing=locked,target=/var/c
# base image. Set to 10 minutes just incase it ran on very old or overallocated
# hardware.
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=600000
# Default Mariadb value of 16 MB (bytes)
ENV MYSQL_MAX_ALLOWED_PACKET=16777216

ENV \
# Default Mariadb value of 16 MB (bytes)
MYSQL_MAX_ALLOWED_PACKET=16777216 \
TRANSACTION_ISOLATION=READ-COMMITTED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please prefix TRANSACTION_ISOLATION with MYSQL to be consistent with the environmental naming conventions across the repository.

So MYSQL_TRANSACTION_ISOLATION.


COPY --link rootfs /
3 changes: 2 additions & 1 deletion mariadb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ default database connection configuration.
| :------------------- | :------ | :------------------------------------------------------------------------------------ |
| MYSQL_ROOT_PASSWORD | | The database root user password. Defaults to `DB_ROOT_PASSWORD` |
| MYSQL_ROOT_USER | | The database root user (used to create the site database). Defaults to `DB_ROOT_USER` |
| MYSQL_MAX_ALLOWED_PACKET | 16777216 | Max packet length to send to or receive from the server, [documentation](https://mariadb.com/docs/server/ref/mdb/system-variables/max_allowed_packet/) |
| MYSQL_MAX_ALLOWED_PACKET | 16777216 | Max packet length to send to or receive from the server, [documentation](https://mariadb.com/docs/server/ref/mdb/system-variables/max_allowed_packet/)
| TRANSACTION_ISOLATION | READ-COMMITTED | The isolation level for transactions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same prefix note as above, and please link to the documentation.

https://mariadb.com/docs/server/ref/mdb/system-variables/transaction_isolation/


## Logs

Expand Down
1 change: 1 addition & 0 deletions mariadb/rootfs/etc/confd/templates/mariadb-server.cnf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[mysqld]
# skip-networking
max_allowed_packet ={{ getenv "MYSQL_MAX_ALLOWED_PACKET" }}
transaction-isolation ={{ getenv "TRANSACTION_ISOLATION" }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same prefix note as above.

# Galera-related settings
[galera]
# Mandatory settings
Expand Down