Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged

Conversation

sureshanaparti
Copy link
Contributor

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:

ALTER TABLE cloud.op_lock ENGINE=INNODB;
ALTER TABLE cloud.op_nwgrp_work ENGINE=INNODB;

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

It is not safe for use with replication, and is straight up incompatible with highly-available active-active type MySQL distributions such as Galera
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

Copy link

@Copilot Copilot AI left a 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 of utf8 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 and MEMORY improves readability and aligns with common SQL conventions.
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

@sureshanaparti sureshanaparti added this to the 4.20.2 milestone Jun 30, 2025
Copy link

codecov bot commented Jun 30, 2025

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 16.15%. Comparing base (ba0204f) to head (b474ab0).
Report is 1 commits behind head on 4.20.

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     
Flag Coverage Ξ”
uitests 4.00% <ΓΈ> (ΓΈ)
unittests 17.00% <ΓΈ> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sureshanaparti sureshanaparti marked this pull request as ready for review June 30, 2025 10:07
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: βœ”οΈ el8 βœ”οΈ el9 βœ”οΈ debian βœ”οΈ suse15. SL-JID 13957

@borisstoyanov
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@borisstoyanov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13641)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 60503 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11106-t13641-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

Copy link
Contributor

@borisstoyanov borisstoyanov left a 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

@rohityadavcloud rohityadavcloud merged commit 544028c into apache:4.20 Jul 2, 2025
25 checks passed
@rohityadavcloud rohityadavcloud deleted the db-init-schema-engine-update branch July 2, 2025 10:15
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.

6 participants