-
Notifications
You must be signed in to change notification settings - Fork 759
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
[metasrv] feature: exchange protocol version with client #5645
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thanks for the contribution! Please review the labels and make any necessary changes. |
8cd102a
to
262575f
Compare
Before transfer any data, `MetaGrpcClient` must ensure it is compatible with the metasrv it is connecting to, in the handshake RPC. Add compatibility cross test: ``` latest query -- latest metasrv old query -- latest metasrv latest query -- old metasrv ``` Features - Compatibility test: download test suite for query. When testing an old query with latest metasrv, download the test suite for that version of query instead of using the latest suite, which may not pass if new feature test is added into the latest suite but not yet impl-ed in the old query. - Compatibility test: Test the compatibility between: - The latest query and the latest metasrv. - The oldest compatible query with latest metasrv. - The latest query with oldest compatible metasrv. - Protocol version exchange when meta-client `handshake` with metasrv. meta-client(query) keeps track of the min-metasrv version it is compatible with. metasrv keeps track of the min-meta-client version it is compatible with. Client handshake check these versions to ensure compatibility. Otherwise an error is returned and no further data will be transferred. - Add admin CLI command `--cmd ver`. `databend-query --cmd ver` outputs its build version and the minimal compatible metasrv version, such as: ``` version: 0.7.61-nightly min-compatible-metasrv-version: 0.7.59 ``` `databend-meta --cmd ver` outputs its build version and the minimal compatible meta-client(query) version, such as: ``` version: 0.7.61-nightly min-compatible-client-version: 0.7.57 ``` Refactors - Add a new error `InvalidArgument` to indicate protocol-error - `MetaGrpcClient::try_new()` does not need to be `async`. - Metasrv config does not `check()` if `--cmd` is non-empty: When `cmd` is specified, it does not mean to run it. Docs - Add doc explain how to check versions and how to upgrade. --- - Fix: databendlabs#5627 - Fix: databendlabs#4948
262575f
to
c9fef8f
Compare
Cool. |
The commit-version will be missing and the query won't be able to connect to metasrv. |
BTW I've once considered using the version defined in
E.g., if the version in Cargo is Then the git-tag triggered release action only is used for formal releases. |
I think this is OK. |
Hmm... looks like CI failed due to this issue. In the CI it just checkout one last commit without any tags. The version can not be determined. It can be worked around by using a special protocol-version == 0, which I do not like. 🤔 |
@everpcpc fixed it, may help here |
@@ -15,6 +15,10 @@ runs: | |||
- name: Maximize build space | |||
uses: ./.github/actions/cleanup | |||
|
|||
- name: Rust setup |
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.
dev_setup
is only needed on macos.
on linux ci, setup_build_tool
already makes it working.
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.
It complains in test-compat.sh
that wget
is not found.
What did I do wrongly?
I was trying to run it with build-tool:
build-tool bash ./tests/compat/test-compat.sh
wget
should be already provided by github-action.
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.
ah, it's not in the build-tool image now.
build-tool command
will run command in container with image datafuselabs/build-tool:dev
maybe you can use curl
instead.
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.
That's all right! Thanks!
should be fixed with: https://github.com/datafuselabs/databend/pull/5520/files#r884142502 |
Is it appropriate to fetch the full history? |
- name: Rust setup | ||
run: | | ||
bash ./scripts/setup/dev_setup.sh -yb | ||
|
||
- name: Setup Build Tool | ||
uses: ./.github/actions/setup_build_tool | ||
|
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.
installing python libs is also not need, and already done by build tool image
we are already doing this with release build, and the checkout takes around 10s which seems fine. |
… query and latest meta, it is covered by other tests
… that are already included in build-tool
1f62512
to
346c102
Compare
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
[metasrv] feature: exchange protocol version with client
Before transfer any data,
MetaGrpcClient
must ensure it is compatiblewith the metasrv it is connecting to, in the handshake RPC.
Add compatibility cross test:
Features
Compatibility test: download test suite for query.
When testing an old query with latest metasrv,
download the test suite for that version of query instead of using
the latest suite, which may not pass if new feature test is added
into the latest suite but not yet impl-ed in the old query.
Compatibility test:
Test the compatibility between:
Protocol version exchange when meta-client
handshake
with metasrv.meta-client(query) keeps track of the min-metasrv version it is compatible
with.
metasrv keeps track of the min-meta-client version it is compatible
with.
Client handshake check these versions to ensure compatibility.
Otherwise an error is returned and no further data will be transferred.
Add admin CLI command
--cmd ver
.databend-query --cmd ver
outputs its build version and the minimalcompatible metasrv version, such as:
databend-meta --cmd ver
outputs its build version and the minimalcompatible meta-client(query) version, such as:
Refactors
Add a new error
InvalidArgument
to indicate protocol-errorMetaGrpcClient::try_new()
does not need to beasync
.Metasrv config does not
check()
if--cmd
is non-empty:When
cmd
is specified, it does not mean to run it.Docs
Changelog
Related Issues