DaanHoogland commented on code in PR #9955:
URL: https://github.com/apache/cloudstack/pull/9955#discussion_r1979112455


##########
engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java:
##########
@@ -486,6 +488,39 @@ public void check() {
         }
     }
 
+    private void initDistributedLock() {
+        LOGGER.info("Setting up distributed lock table if not created.");
+        TransactionLegacy txn = TransactionLegacy.open("initDistributedLock");
+        txn.start();
+        String errorMessage = "Unable to get the database connections";
+        try {
+            Connection conn = txn.getConnection();
+            errorMessage = "Unable to create distributed_lock table in the 
'cloud' database ";
+            String sql = "CREATE TABLE IF NOT EXISTS 
`cloud`.`distributed_lock` (" +

Review Comment:
   I meant removing any of those locks, but in hindsight I think that is either 
handled elsewhere or might be even destructive (i.e. deleting a lock for 
another MS which is still running)



-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to