Giter Club home page Giter Club logo

Comments (2)

blagerweij avatar blagerweij commented on July 27, 2024 1

This seems like a problem in Liquibase itself (not the lock implementation). You'll notice these lines in pod #3:
INFO 2023-08-29T11:06:10.703Z Successfully acquired change log lock
INFO 2023-08-29T11:06:13.105Z Reading from rfid.DATABASECHANGELOG
INFO 2023-08-29T11:06:13.382Z Successfully released change log lock
At this time, the second pod has not finished, so the DATABASECHANGELOG will not have the changeset marked as done.
Then later, after it acquired the lock again, it will execute the changesets which it think still need execution, but it does not reread from the DATABASECHANGELOG table.

Either Liquibase should not release the lock between the read and execute, or it should reread from the DATABASECHANGELOG table. Are you able to upgrade to the latest version of Liquibase, to see if the problem is still present in the latest version?

It would be nice to include an integration test for your scenario, but I also realize it might be hard to implement.

from liquibase-sessionlock.

matesebi avatar matesebi commented on July 27, 2024

Thank you for your answer, after some more testing, debugging and digging through Liquibase release notes, I think I found why the lock is released after readnig the rfid.DATABASECHANGELOG table: Liquibase Issue.

For some reason without liquibase-sessionlock the change set was never applied twice in my tests, but with it it was always applied twice.

The releasing of the lock was fixed in Liquibase v4.4.1, so I upgraded our Spring Boot version to 2.7.15 which uses Liquibase version 4.9.1, and ran my tests again, the lock was not released between reading the rfid.DATABASECHANGELOG table and applying the change set, with or without liquibase-sessionlock.

It was just a coincidence, that after adding the liquibase-sessionlock dependency I started to notice the change set applying twice.

Thank you again for your answer, I'll close this issue.

from liquibase-sessionlock.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.