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

Distributed Table-Based Lock #9955

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rohityadavcloud
Copy link
Member

This introduces an experimental MySQL Db-table based locking mechanism instead of using GET_LOCK/RELEASE_LOCK which is documented as limitation for many Mysql-clustering solutions such as https://docs.percona.com/percona-xtradb-cluster/8.0/limitation.html

This needs to be reviewed and tested against such mysql-clustering solutions and whether active-active or active-backup setup can work with CloudStack mgmt server(s) with these changes.

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

Cleanup old mac address handling code to use JDK11 lib instead of hacks.
Also really strange to see some basic string parsing code was written by
hand, replaced with Long.parseValue(str, 16) to convert hex string to
long.

Signed-off-by: Rohit Yadav <[email protected]>
This introduces a MySQL innodb table based distributed lock which can
be used by one or more management server and its threads. This removes
usage of MySQL server provided locking functions (GET_LOCK,
RELEASE_LOCK) which are not replicated or supported currently by any
MySQL clustering solutions. This would be the first main step in having
CloudStack to work with a MySQL clustering solution such as InnoDB
cluster, Percona Xtradb cluster, MariaDB galera cluster. There may be
other changes required which can be found in due course if this feature
works at scale.

Signed-off-by: Rohit Yadav <[email protected]>
@rohityadavcloud rohityadavcloud added this to the 4.21.0 milestone Nov 20, 2024
@rohityadavcloud rohityadavcloud removed the request for review from shwstppr November 20, 2024 14:26
@DaanHoogland DaanHoogland changed the base branch from main to 4.19 November 20, 2024 14:28
@rohityadavcloud rohityadavcloud marked this pull request as draft November 20, 2024 14:29
@rohityadavcloud rohityadavcloud changed the base branch from 4.19 to main November 20, 2024 14:33
@rohityadavcloud
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

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

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 4.04%. Comparing base (8a2c0f3) to head (a08d205).

❗ There is a different number of reports uploaded between BASE (8a2c0f3) and HEAD (a08d205). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (8a2c0f3) HEAD (a08d205)
unittests 1 0
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #9955       +/-   ##
============================================
- Coverage     15.80%   4.04%   -11.77%     
============================================
  Files          5627     392     -5235     
  Lines        492343   32177   -460166     
  Branches      59694    5679    -54015     
============================================
- Hits          77828    1301    -76527     
+ Misses       405992   30728   -375264     
+ Partials       8523     148     -8375     
Flag Coverage Δ
uitests 4.04% <ø> (ø)
unittests ?

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.


🚨 Try these New Features:

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 11588

@rohityadavcloud
Copy link
Member Author

@shwstppr can you help look at this? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants