0
Good morning,
I created a Spring Boot application and through the properties I enabled the file base to check if it is necessary to upgrade the database structure.
The problem is that the first step is to check if there is a lock in the database in order to make the changes. If it does not have it crashes the database to check if it is necessary to apply some update. It happened that a few times the application crashed before releasing the lock and I had to manually remove this lock.
When the application finds a lock, is there any way for it to ignore the quibase execution instead of not being able to climb? Or simply remove the lock after a few attempts?
Taking advantage of the question, using the base to automatically update the database is a good or bad practice to put into production?
I understand why the lock exists, is that in this particular case I’m sure that this is the only application that moves this bench. Would it be possible then if he could not lock at least the application go up without running Liquibase? 'Cause today, if she tries to take the lock from the bank and she can’t get the app, she won’t go up.
– Bruno Pinho
Natively from liquibase there is no feature to remove the lock, however, you can create a tool that performs the check of the lock record and remove it manually before executing your step from the liquibase. It is always important to ensure that there are no two executions in parallel in any way.
– nullptr
Currently your application goes up and also runs the liquibase? An interesting approach would be to separate this responsibility into another project that just runs the base, so your application would always go up using the base, which in this case was managed by an earlier step, in another project
– nullptr
I was using the Spring Boot base due to the ease of implementation, but I am thinking of changing this because of this application problem do not go up if you have any problem with the base. I thought there might be a solution to this. Thank you. Question answered. I will check if I put the liquibase script running on the terraform of the application instead of going up with spring boot.
– Bruno Pinho