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 test cases for the data encoding compatibility #1372

Open
1 of 2 tasks
git-hulk opened this issue Apr 5, 2023 · 7 comments
Open
1 of 2 tasks

Add test cases for the data encoding compatibility #1372

git-hulk opened this issue Apr 5, 2023 · 7 comments
Assignees
Labels
enhancement type enhancement good first issue Good for newcomers help wanted Good for newcomers

Comments

@git-hulk
Copy link
Member

git-hulk commented Apr 5, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

Motivation

As @PragmaTwice mentioned in an offline topic(@DenizPiri also mentioned in #414 (comment).), we didn't have any test cases to ensure the data encoding is compatible with the old version, which is very important for a storage service.

Solution

We can create a minimized dataset for all types per release(starting from 2.3.0), then load and check the dataset is ok to load.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@git-hulk git-hulk added enhancement type enhancement help wanted Good for newcomers good first issue Good for newcomers labels Apr 5, 2023
@git-hulk git-hulk moved this to To Do in Kvrocks 2024 Roadmap Aug 16, 2023
@HolyLow
Copy link
Contributor

HolyLow commented Sep 25, 2023

@git-hulk I see this issue in the roadmap, and as it seems that no one is working on it (because this issue is troublesome and dirty...?), could you assign it to me?

Currently I only have some unclear thoughts on this topic. I think to check the data encoding compatibility, we are supposed to:

  1. Write the raw data in different version's encoding (use the RocksDB api directly and bypass the kvrocks api);
  2. Then read the data with the current version's kvrocks api to check if the data is readable and the data semantic is correct.

But still, I am not sure of the proper workflow, or how far we should go.
Maybe you could kindly refer me to some existing projects' "data encoding checking" mechanism/code to shed me some light, if you happen to know.
I would try to find some material myself as well.

@git-hulk
Copy link
Member Author

@git-hulk I see this issue in the roadmap, and as it seems that no one is working on it (because this issue is troublesome and dirty...?), could you assign it to me?

Currently I only have some unclear thoughts on this topic. I think to check the data encoding compatibility, we are supposed to:

  1. Write the raw data in different version's encoding (use the RocksDB api directly and bypass the kvrocks api);
  2. Then read the data with the current version's kvrocks api to check if the data is readable and the data semantic is correct.

But still, I am not sure of the proper workflow, or how far we should go. Maybe you could kindly refer me to some existing projects' "data encoding checking" mechanism/code to shed me some light, if you happen to know. I would try to find some material myself as well.

Hi @HolyLow Assigned, thanks for your interest.

Let me think a bit about this, I will ping you back soon.

@HolyLow
Copy link
Contributor

HolyLow commented Dec 22, 2023

@git-hulk Hello, do you have any thoughts yet?

@git-hulk
Copy link
Member Author

@HolyLow Thanks for your followup, I forgot about this issue. You can continue moving on if you have any ideas to achieve this.

@PragmaTwice
Copy link
Member

I think maybe you can add a new job in the nightly CI workflow, and cache the binary of an old version of kvrocks, e.g. 2.6.0.

@git-hulk
Copy link
Member Author

I'm wondering if it's good to maintain a docker image for testing this.

@PragmaTwice
Copy link
Member

I'm wondering if it's good to maintain a docker image for testing this.

Ahh good idea, we can just fetch docker images of old version kvrocks rather than cache the binary in GitHub actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type enhancement good first issue Good for newcomers help wanted Good for newcomers
Projects
Development

No branches or pull requests

3 participants