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

Conversation

aOelschlager
Copy link
Contributor

For issue #309. This adds an environment variable to the mariadb image that allows you to set the transaction isolation setting. It defaults to READ-COMMITTED now.

Related issues: Islandora/documentation#1481 and Islandora-Devops/islandora-playbook#250

Copy link
Contributor

@nigelgbanks nigelgbanks left a comment

Choose a reason for hiding this comment

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

Very good, just a few small things and it's ready to go in.

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.

@@ -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/

@@ -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.

@aOelschlager
Copy link
Contributor Author

Thank you @nigelgbanks for the feedback and for reviewing it. That makes sense to me and I made the changes that you recommended.

@nigelgbanks nigelgbanks merged commit 171ae20 into Islandora-Devops:main Dec 1, 2023
@aOelschlager aOelschlager deleted the 309-add-read-committed branch December 5, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants