Our SaaS solution has a model where each customer has a dedicated Azure SQL Database and multiple environments (so 3 databases per customers). We are currently using liquibase to apply all our SQL changes, and this is working great but we are at the point where we are being hit with deployment scalability issues.
We have developed a spring boot application which is able to accept list of databases in JSON format to be modified and application is using multithreading(Async and executor) to execute changes on these database parallel. The application is able to connect to all databases and create liquibase tables but it soon releases the lock and is not executing the changelog file. If I resend my JSON to the application, the application will execute only on 1 database and parallel execution is not happening.
If it is able to connect to all the databases then it should be able to execute changelog-master on all but is not happening.
Could someone please help us with this issue and how to resolve
Hey @shrirangb91 - Welcome to the community!
We had our quarterly AMA yesterday, and we answered your question there! it’s towards the end of the Q & A section of the video. Check it out! Your questions are answered! Ask Me Anything - Liquibase Community Meetup - AMA July 2022 - YouTube
I did go through the session and wanted to share few inputs for further investigation.
Assume that we have 4 Azure sql dBs and we have to run the same master file on all 4 dBs. We are using multithreaded environment where each thread connects with 1 dB and starts execution.(We are using Liquibase class to initialise and run changes. This is a manual execution of Liquibase rather than autoconfigured spring boot). For each thread, the DATABASECHANGELOGLOCK and DATABASECHANGELOG tables do get created but they do not run the master changelog file and do not create sample table within. If we reduce number of threads to 1, it executes in sequential form.
Every thread had different dB connected to it so different log and log lock tables are created.
Hopefully, this elaborates enough to picture the scenario. It would be really helpful if you could share inputs on the same.