patka / cassandra-migration

Schema migration library for Cassandra

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support new java-driver-core 4.0

joachse opened this issue · comments

Hi,

Are there any plans on supporting the new Cassandra library java-driver-core?

Hi,

Yes there is. I am currently just thinking how to make the transition smooth for library users as the drivers API is unfortunately not backward compatible.

Cheers
Patrick

Hi @patka, what's the status of this issue? Do you need any help? We'd like to upgrade the driver and are blocked by the library, so will be more than happy to give you a hand!
If it's of any help, as a library user I'd be fine if you just generate a new major version for your library?

Hi Albert,

hm, actually I replied to you yesterday but obviously the mail did not make it to Github. Anyway, on my commute home yesterday I was able to integrate the new version into the library. What is left are the integration tests and some testing. The integration tests are a little bit more tricky as cassandra-unit does also not yet support the driver in version 4 but Maven of course resolves to the latest version of the library. So, I have to find a way to test this. Worst case scenario is that for the time being the tests only work when there is a Cassandra node running on localhost or something like this. I never wanted this scenario and I hope that there will be a better solution, either now or soon.

As for the timeline. My plan is to get this done on the weekend. I will most likely then create a branch v2_4 from which I can create a release v2.2.1_v4. Like this there is the possibility to create a new release of the library with version 3 of the driver, in case of a bug, until Datastax finally deprecates the version 3.

So, unless there is something unforeseen you should get something by next week what you can use to test the migration.

Cheers
Patrick

Hi,

there is a new branch master_v4 that contains an updated version with the changes to use the driver v4. As the documentation is not yet updated here are some things to consider:

  • It would be best to provide a dedicated CqlSession to the database class as it make use of the "USE keyspace" command in order to be backward compatible with the migration scripts unless we are already on the configured keyspace.
  • It would therefore not yet use the spring boot starter. I have to investigate first if it is possible to use named beans in order to have a dedicated one here.
  • The tests currently only work if there is a node running on localhost as cassandra-unit is not yet available for driver version 4.

It would be great if you could give it a try and let me know if you have some issues. Otherwise I would create a release soon.

Cheers
Patrick

Hi @patka, I've been playing a bit with it and it looks like this branch working for me, thanks a lot!

Great! So I will see that I get a release out in the next couple of days.

I just pushed the changes required for the Spring Boot Starter. If my kids don't cross my plans I will release version 2.2.1_v4 this evening.

That's excellent news, thanks a lot @patka!

I just released the library. Normally it takes a couple of hours until it is available in the Maven repos. Let me know if there are any issues.
Glad I could help :)

Any plans on a _v4 version of 2.3?

Hi,

yes, as a matter of fact I have :)

But as most other people I am currently working from home with two kids to take care of. I have it on my agenda and want to do it but I can currently not provide any estimate.

I released v2.3.0_v4. Give it some time to propagate through the maven repos.