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

Consider exposing awaitSchemaAgreement #1301

Closed
muirdm opened this issue Apr 15, 2019 · 6 comments
Closed

Consider exposing awaitSchemaAgreement #1301

muirdm opened this issue Apr 15, 2019 · 6 comments

Comments

@muirdm
Copy link

muirdm commented Apr 15, 2019

Wanted to see what others thought about adding func (*Session).AwaitSchemaAgreement() error as a public method.

I'm running schema changes from gocql and I want to make sure the schema is in agreement after every schema change. gocql has built-in calls to awaitSchemaAgreement, but it doesn't propagate an error. I could query system.peers myself, but you also need to query the coordinator's system.local to get the full list. gocql doesn't really provide a way to query a specific node (that I know of) short of making a second cluster with host limiting config. It would be convenient if I could just depend on gocql's already implemented logic to check the entire ring's schema version.

@alourie
Copy link
Contributor

alourie commented Apr 16, 2019

@Zariel your opinion? I can make the change as a part of #1300

@annismckenzie
Copy link
Contributor

I added this in #1395 – I'd like to use it in gocqlx's issue scylladb/gocqlx#106 to await schema agreement before applying each statement in a migration. Thoughts?

@annismckenzie
Copy link
Contributor

This was added in #1395. Close this issue?

@alourie
Copy link
Contributor

alourie commented Feb 2, 2020

@annismckenzie Please do :-) Thanks!

@annismckenzie
Copy link
Contributor

I can't! :D

@alourie
Copy link
Contributor

alourie commented Feb 2, 2020

haha, fine :-)

@alourie alourie closed this as completed Feb 2, 2020
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

No branches or pull requests

3 participants