-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Do not rely on Memory engine in DB setup scripts #11106
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
Do not rely on Memory engine in DB setup scripts #11106
Conversation
It is not safe for use with replication, and is straight up incompatible with highly-available active-active type MySQL distributions such as Galera
@blueorangutan package |
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.
Pull Request Overview
This PR updates the table storage engine for op_lock
and op_nwgrp_work
from MEMORY to InnoDB to ensure compatibility with asynchronous replication and HA MySQL setups.
- Changed
op_lock
engine to InnoDB - Changed
op_nwgrp_work
engine to InnoDB
Comments suppressed due to low confidence (2)
setup/db/create-schema.sql:401
- Consider using
DEFAULT CHARSET=utf8mb4
instead ofutf8
to support full Unicode (e.g., emoji and supplementary characters).
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
setup/db/create-schema.sql:1796
- [nitpick] Ensure engine names are consistently cased in the schema—using uppercase
INNODB
andMEMORY
improves readability and aligns with common SQL conventions.
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11106 +/- ##
============================================
- Coverage 16.15% 16.15% -0.01%
Complexity 13277 13277
============================================
Files 5657 5657
Lines 497939 497939
Branches 60386 60386
============================================
- Hits 80443 80440 -3
Misses 408532 408532
- Partials 8964 8967 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@blueorangutan package |
@blueorangutan package |
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13957 |
@blueorangutan test |
@borisstoyanov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-13641)
|
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.
LGTM, I did a setup and deployment tests and did not encountered any issues with this change
Description
This PR updates the engine of op_lock and op_nwgrp_work to 'InnoDB' (from 'Memory'), and ensures the initial db schema does not rely on Memory engine (mainly during DB bootstrap). It is not safe for use with asynchronous replication in the case of failovers, and is straight up incompatible with some HA MySQL distributions/extensions such as Galera.
This is already done in 4.9.0.0 to 4.9.1.0 upgrade path here:
cloudstack/engine/schema/src/main/resources/META-INF/db/schema-490to4910.sql
Lines 30 to 31 in 16c60c7
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?