rohityadavcloud opened a new pull request, #9955:
URL: https://github.com/apache/cloudstack/pull/9955

   This introduces a innodb 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 
   
   The locking mechanism uses DB-transactions to acquire and store locks in the 
database. In some cases MySQL deadlock can happen (as demonstrated by dummy 
bg-thread task 
https://github.com/apache/cloudstack/pull/9955/commits/d15c67251daf9da53aa0c4179959408437589165),
 however, as global locks have large-enough timeout, the code retries to 
acquire lock again when an exception happens within the timeout period.
   
   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)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] 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
   
   - [x] Major
   - [ ] Minor
   
   ### How this was tested
   
   For testing purposes, I create a 3x mgmt server host, 2x kvm host env (using 
mbx). Then on each of the mgmt server hosts, I had [Percona XtraDB cluster node 
setup](https://docs.percona.com/percona-xtradb-cluster/8.0/get-started-cluster.html)
 in a 1:1 fashion such as each mgmt server connects to the locally running 
MySQL instance, while the 3x MySQL instances are in a cluster. This allows & 
enabled control-plane HA strategy, wherein both mgmt server & database achieve 
HA in variety of strategies (such as 1:1 setup, or using an internal LB or 
proxy middleware on the mgmt server host such as ProxySQL).
   
   Screenshots:
   <img width="1603" alt="Screenshot 2025-03-06 at 3 26 36 PM" 
src="https://github.com/user-attachments/assets/f83b4cc7-142f-4df7-80dc-69176d0a2a72";
 />
   <img width="773" alt="Screenshot 2025-03-06 at 3 26 49 PM" 
src="https://github.com/user-attachments/assets/f7aeb0db-e825-466c-a9d2-14b4b315db9b";
 />
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to