-
Notifications
You must be signed in to change notification settings - Fork 94
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
Schema agreement #223
Schema agreement #223
Conversation
f603316
to
0198cdf
Compare
@Kejmer we don't have any environment for automated distributed tests (yet), so yes, it's satisfactory. But, please also test manually that this code works on a multi-node cluster as well. If I remember correctly, I sent the instructions to run a local multi-node cluster with ccm to @havaker once, so he might be able to give some more guidance (https://github.com/scylladb/scylla/wiki/Using-CCM) |
aead6cb
to
181e685
Compare
@psarna we can add a cluster to the CI like this: https://github.com/Jasperav/docker-compose-check/blob/master/docker-compose.yml. Sadly Scylla sometimes fails to startup with docker compose :( scylladb/scylladb#8458 |
Yeah, eventually we'd like to have a multi-node cluster CI, but it shouldn't block this series. @Kejmer please rebase on top of master, since there are some conflicts (probably due to events getting merged) |
…ersion. User can check what is the current schema version with `fetch_schema_version` method. There are two ways of waiting for schema agreement, with or without timeout. Without timeout `await_schema_agreement` can be used to create a co_await that user can wait on as long as schema is not in an agreement, there is no return value. With timeout user can't wait longer than provided timeout in miliseconds. If timeout is reached function returns false as a return value, true otherwise. User can specify interval that driver checks the schema agreement by setting `schema_agreement_interval` in SessionBuilder. Simple schema agreement example Showcase how to use methods introduced in schema_agreemnet pull request.
adf8b7b
to
f6e255a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left several minor comments, but apart from that - looks good.
@piodul were all your review comments addressed or is something still pending? |
No, comments from my second review are still pending. However, they are mostly nitpicks with respect to style and documentation - the implementation itself looks good, so if you want to merge now then I think I'm OK with fixing the rest in a followup. |
Sorry I missed notification about new review, I'll finish it as fast as possible |
f6e255a
to
2c810e4
Compare
Now schema agreemnt works on connection level so it can use the same connection to get information what is the local schema_version and what are peers' schema_versions. Timed schema_agreement await takes now Duration as an argument so it will be more descriptive at execution. Made check_schema_agreement into a public method.
2c810e4
to
1b1532c
Compare
Pre-review checklist
Fixes:
annotations to PR description.Fixes: #83
Created waiting for schema agreement mechanism for
Session
and setting the interval of that check inSessionBuilder
.User can now check local schema version and await for schema agreement with timeout or with endless timeout.
New methods:
Session::fetch_schema_version
,Session::await_schema_agreement
,Session::await_timed_schema_agreement
,SessionBuilder::schema_agreement_interval
.I'm not really sure what kind of tests should I provide to test that feature, so I'm asking now if adding line that awaits schema agreement in existing test is satisfactory? @psarna // solved