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

Add compat test for metadata objects #6567

Closed
flaneur2020 opened this issue Jul 11, 2022 · 2 comments
Closed

Add compat test for metadata objects #6567

flaneur2020 opened this issue Jul 11, 2022 · 2 comments

Comments

@flaneur2020
Copy link
Member

flaneur2020 commented Jul 11, 2022

Summary

similar issue: #6557

the metadata objects are the metatypes stored inside metasrv, but the data schema is only known to databend-query.

on changing the metatypes definitions, there's possibility to break up compat in both backwards and forwards manner:

like:

  1. create user/stage/udf in current version
  2. read the user/stage/udf in the previous version

and:

  1. create user/stage/udf in the previous version
  2. read the user/stage/udf in the current version
@BohuTANG
Copy link
Member

@drmingdrmer for some suggestions on the CI.

@drmingdrmer
Copy link
Member

The compatibility between rust-types and protobuf is mainly about these two versions:
https://github.com/datafuselabs/databend/blob/28598be16cbf4dffa3c6b9fa62d62421c3f422e2/common/proto-conv/src/lib.rs#L33-L34

To ensure compatibility, the best practice would be: every time to change the rust types:

When an old version of rust types is no longer needed, increment MIN_COMPATIBLE_VER and delete the test data and case.

BTW, if necessary, it would be better to introduce more than one pair of VER, MIN_COMPATIBLE_VER for different kinds of metadata, e.g. SCHEMA_VER and SCHEMA_MIN_COMPATIBLE_VER for data types used by SchemaApi, USER_VER and USER_MIN_COMPATIBLE_VER for data types used by user related APIs. Since different kinds of meta types may evolve independently.

@Xuanwo Xuanwo closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2022
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

4 participants