Changesets get executed every time

My change sets are getting in each run of my SpringBoot app.
I found a mention in some other forum that it might be issue with the file path
and I tried mentioning logicalFilePath so that we have a custom entry.
It did not help me with the issue.
Has anything changed with new liquibase versions.
Please let me know.Any inputs appreciated.

Regards,
Santosh

@ktaggart would you know ?
Thought of tagging you for visibility.

Regards,
Santosh

@santoshtrip nothing I can think of right away… can you give a bit more background? Have you been running your app successfully before with the previously applied changesets correctly being skipped? I assume this is the scenario you are describing? That you had a bunch of changesets in a changelog that have already been applied, the app starts, those changesets are correctly skipped since they have already been applied and suddenly this changes and they are getting applied again?

If I have this right, what version of Liquibase were you using before and what version are you using that seems to manifest this behavior?

Thanks!
KT

@ktaggart ,
I am trying liquibase-ext for Cassandra for the first time.I have not been able to correctly skip the changesets in a changelog that have already been applied, the app starts, those changesets get applied again. :slight_smile: I was under the impression that the changes already applied will be skipped when I run.

Here is my dependency below:

org.liquibase.ext
liquibase-cassandra
4.1.0.1

This is my configuration code .

Class.forName(“com.simba.cassandra.jdbc42.Driver”);
com.simba.cassandra.jdbc42.DataSource ds = new com.simba.cassandra.jdbc42.DataSource();
ds.setURL(dataSourceUrl);
ds.setUserID(username);
ds.setPassword(password);

    DataSourceClosingSpringLiquibase liquibase = new DataSourceClosingSpringLiquibase();
    liquibase.setDefaultSchema(schema);
    liquibase.setLiquibaseSchema(schema);
    liquibase.setCloseDataSourceOnceMigrated(true);
    liquibase.setDataSource(ds);
    liquibase.setChangeLog(defaultLiquibaseChangelog);
    if(testRollBack) {
        liquibase.setShouldRun(false);
    }

Changelog file :

<?xml version="1.1" encoding="UTF-8" standalone="no"?>
    <sql>
        CREATE TABLE uniqueChecksum (
        id uuid,
        name text PRIMARY KEY,
        description text,
        price decimal,
        created timestamp
        );
    </sql>

</changeSet>

Tagging @nvoxland as well :slight_smile:

Thank you again for all the help.

Regards,
Santosh

Great news! I was able to resolve the issue wherein change sets (with same id) are getting executed every time.There was bug in the liquibase jar version (4.1.1) which I was using.After some serious debugging figured out that we are running into concurrency issue.I upgraded the liquibase-cassandra jar to the latest (4.17.1) and the issue got resolved.

Thanks folks! :grinning:

2 Likes

great news!!! Glad you were able to get it working.

1 Like