Open claudio-oleiro opened 1 week ago
@maximevw do you have any idea about it?
To provide more context about the issue, I tested the update command using a previous Liquibase version (v4.29.0), and it executed successfully. This suggests that the problem is specific to Liquibase v4.30.0.
Hello @claudio-oleiro,
Thank you for the detailed issue. Indeed, I see that in the v4.30.0 of liquibase-standard
, the implementation of the method SnapshotGeneratorFactory.has(DatabaseObject, Database)
has changed compared to the version 4.29.0. This method is called by the method isDatabaseChangeLogLockTableCreated(boolean)
when the StandardLockService
is initialized. This method is not re-implemented in the LockServiceCassandra
, so a quick fix could be to re-implement it in the LockServiceCassandra
re-using the implementation of isDatabaseChangeLogLockTableCreated()
:
https://github.com/liquibase/liquibase-cassandra/blob/2cbcaf2267e7857b742335101f10e856c363f3b3/src/main/java/liquibase/ext/cassandra/lockservice/LockServiceCassandra.java#L130-L147
This avoid to use the new SnasphotGeneratorFactory
implementation, probably not compatible with the constraints of AWS Keyspaces/Cassandra. What do you think @filipelautert?
Hi everyone,
I’m encountering an issue while running the liquibase update command on AWS Keyspaces. Based on the debug logs (enabled via liquibase.properties), the problem seems related to the creation/initialization of the lock table. Below are the relevant log details:
After 10 retries, the command terminates with the following error::
Observations
The liquibase update command fails during the lock table initialization. After the error, the lock table is deleted (potentially due to Liquibase rollback behavior).
Other commands, like liquibase status and liquibase updateSQL, work without issues.
Current Configuration Here is the relevant liquibase.properties configuration:
changelog file
Additional Notes
AWS Keyspaces compatibility mode is enabled (liquibase.cassandra.awsKeyspacesCompatibilityModeEnabled: true).
The error might be related to known limitations or compatibility issues between Liquibase and AWS Keyspaces. However, I couldn’t find any documentation addressing this specific issue.
Steps to Reproduce
Expected Behavior The liquibase update command should execute successfully, initializing the lock table as needed.
Actual Behavior The command fails during the lock table initialization process, with the error: java.sql.SQLRecoverableException: Method was called on a closed ResultSet.
Request for Assistance Has anyone faced a similar issue or know a workaround to resolve this? Any insights on configuring Liquibase with AWS Keyspaces to handle lock table initialization would be greatly appreciated.