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

Missing support to wait for schema agreement #181

Open
bettio opened this issue Apr 10, 2020 · 5 comments
Open

Missing support to wait for schema agreement #181

bettio opened this issue Apr 10, 2020 · 5 comments

Comments

@bettio
Copy link

bettio commented Apr 10, 2020

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
Copy link
Owner

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

@bettio
Copy link
Author

bettio commented Apr 15, 2020

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
Copy link
Author

bettio commented Apr 22, 2020

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
Copy link
Owner

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

  • The one you proposed, where you could have Xandra.execute_with_schema_agreement(conn, fun)

  • An option to the various execute functions, such as Xandra.execute(conn, query, wait_for_schema_agreement: 5000) or something like this.

Thoughts? cc @lexmag

@whatyouhide
Copy link
Owner

@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 :)

@whatyouhide whatyouhide added this to the v0.15.0 milestone Mar 20, 2023
@whatyouhide whatyouhide removed this from the v0.15.0 milestone Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants