-
Notifications
You must be signed in to change notification settings - Fork 333
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
Implement an RDS kvbackend #4404
Comments
@WenyXu Needs more detailed info for developers. For example, the key component or code segment etc. |
This issue is very interesting may i work on this one? may i use this client https://crates.io/crates/aws-sdk-rds |
Of course, would you like simply describe your idea or plan?
I think it's better not rely on a particular RDS client. |
My idea is very naive, lets use postgres impl as an example: |
Cool. BTW, this feature could be an epic; you may need to create multiple PRs to implement it and a tracking issue to track it. 👀 |
I realized we have to implement normalizedkey string, value bytes, lock owner string, lock expire timestamp denormalized
|
Currently, DistLock is not being used in practice. I think we can hold off on implementing it for now. What do you think? @WenyXu |
Yes, maybe we can implement an RDS kvbackend first. |
Thank you for confirming. I wrote some early skeleton code. If this is the approach you wanted to see I can continue if not let me know i can adjust. |
LGTM, let's keep going on 🚀 |
We can set up a Postgres in GitHub Actions. BTW, For kv backend's integration tests, we have some test suites to ensure that all implementation has the same behaviors. greptimedb/src/common/meta/src/kv_backend/etcd.rs Lines 568 to 575 in b298b35
We don't have the benchmarks for the metasrv for now. |
Hey the postgres kvBackEnd is very close to complete #4421 i just have two small questions:
|
Yes, I agree with you, For now, we can carefully remove the tailing struct RangeRequest {
key: Option<Vec<u8>>,
range_end: Option<Vec<u8>>,
...
} or enum RangeRequest{
KeyRange(...)
SIngleKey(...)
} cc @fengjiachun
Yes, we are following the etcd's behaviors https://etcd.io/docs/v3.3/learning/api/#key-value-pair |
Thank you, I fixed the second case on range delete. I do agree with refactoring |
What problem does the new feature solve?
Currently, all metadata is stored in etcd. If we implement an RDS key-value backend, we can allow users to deploy a GreptimeDB cluster without relying on etcd.
What does the feature do?
Implement an kvbackend using RDS(e.g., MySQL, Postgres) .
Implementation challenges
It's a good idea to start by implementing an RDS-based
KvBackend
:greptimedb/src/common/meta/src/kv_backend.rs
Lines 40 to 155 in 2ae2a66
The text was updated successfully, but these errors were encountered: