rafaelweingartner commented on issue #2364: [CLOUDSTACK-10195] CloudStack MySQL HA problem -- No database selected URL: https://github.com/apache/cloudstack/pull/2364#issuecomment-352518710 Because it was testing the method `txn.transitToUserManagedConnection(getHeartbeatConnection())`. I replaced the use of this method by `txn.transitToAutoManagedConnection(TransactionLegacy.CLOUD_DB);` If you see in that code at line 600, after "trying" to reuse a connection if something goes wrong, it will try to transit to a transaction using schema "Cloud_DB", and then it will close the transaction. The only place where the transaction was "reused" is there. So, when I changed `txn.transitToUserManagedConnection(getHeartbeatConnection())` to `txn.transitToAutoManagedConnection(TransactionLegacy.CLOUD_DB);`, the first method could be deleted. After that, I inspected and this method is not used anywhere else. Therefore, I also removed the method and its test cases.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
