Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom change log and -lock tables with keyspace issue #105

Closed
denyskonakhevych opened this issue Oct 15, 2021 · 1 comment · Fixed by #106
Closed

Custom change log and -lock tables with keyspace issue #105

denyskonakhevych opened this issue Oct 15, 2021 · 1 comment · Fixed by #106

Comments

@denyskonakhevych
Copy link

denyskonakhevych commented Oct 15, 2021

In my case I have multiple services and for each I want to have separate pair of change log tables.
The problem is that underlying logic either uses custom table names without keyspace or changeloglock table is hardcoded with 'DATABASECHANGELOGLOCK' value

┆Issue is synchronized with this Jira Bug by Unito

@denyskonakhevych denyskonakhevych changed the title Custom changeLog and -lock table do not deal with keyspace Custom change log and -lock tables with keyspace issue Oct 15, 2021
@mdebellefeuille
Copy link

mdebellefeuille commented Oct 27, 2021

Hello,

I got a similar problem, it may be also fixed by the awaiting PR.

I'm using Liquibase Cassandra Ext via Spring Boot

when I try to specify different table names for the log table and the lock log table it fails looking for the default table name.

this configuration works

spring:
  liquibase:
    change-log: classpath:/db/migration/cassandra/main-changelog.xml
    url: jdbc:cassandra://${spring.data.cassandra.contact-points}:${spring.data.cassandra.port}/${spring.data.cassandra.keyspace-name};DefaultKeyspace=${spring.data.cassandra.keyspace-name}
    driver-class-name: com.simba.cassandra.jdbc42.Driver

the following doesn't

spring:
  liquibase:
    change-log: classpath:/db/migration/cassandra/main-changelog.xml
    database-change-log-table: change_log
    database-change-log-lock-table: change_log_lock
    url: jdbc:cassandra://${spring.data.cassandra.contact-points}:${spring.data.cassandra.port}/${spring.data.cassandra.keyspace-name};DefaultKeyspace=${spring.data.cassandra.keyspace-name}
    driver-class-name: com.simba.cassandra.jdbc42.Driver

it gives the following exception: com.simba.cassandra.shaded.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table change_log_lock.

and the log says that it's looking for DATABASECHANGELOGLOCK

liquibase.ext : No DATABASECHANGELOGLOCK available in cassandra.
liquibase.ext : successfully.acquired.change.log.lock
liquibase.ext : expecting exactly 1 table with name change_log, got 0
liquibase.ext : Creating database history table with name: keyspace.change_log
liquibase.ext : Reading from keyspace.change_log
liquibase.ext : Successfully released change log lock
liquibase.hub : Could not release lock

liquibase.ext : Waiting for changelog lock....
liquibase.ext : Successfully released change log lock
liquibase : Could not release lock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants