whatyouhide / xandra

Fast, simple, and robust Cassandra/ScyllaDB driver for Elixir.
ISC License
395 stars 54 forks source link

Missing support to wait for schema agreement #181

Open bettio opened 4 years ago

bettio commented 4 years ago

Xandra does not allow to wait for schema ageement/consensus after (maybe also before) executing schema changes. Cassandra exports schema_version on system.peers and system.local tables, and some Cassandra database drivers allow to wait for consensus/schema agreement. This feature seems to be required when executing migrations between different schema versions on Cassandra clusters.

  1. Are pull requests with this feature going to be accepted?
  2. Should this API be implemented as an additional module built on top of existing Xandra modules, or should the driver hide this detail to the end user?
whatyouhide commented 4 years ago

Can this be built on top of Xandra right now, or does it need to be build inside Xandra?

bettio commented 4 years ago

It can be built on top of existing Xandra code (without any change to it), so I'm trying to understand if it would be an useful addition to Xandra.

bettio commented 4 years ago

Please take a look to our PoC:

Let me know if you would like to see as part of Xandra, if so I will open a PR.

whatyouhide commented 4 years ago

Okay, I finally had the time to take a look at this. I'm undecided between the possible APIs:

Thoughts? cc @lexmag

whatyouhide commented 3 years ago

@bettio sorry, I haven't had cycles to tend to Xandra in a long time. I’m inclined to go with the :wait_for_schema_agreement option. Thoughts? I won't have time to implement anything but I'll try to carve time to review stuff if you're still interested in getting this feature in :)